Home > Articles > Web Development

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

The Template Manager: Templates

If you select the tab Templates in the horizontal navigation, you will get straight to the installed templates, as shown in Figure 8.3. At first glance, this view does not seem very spectacular, but it is clearly a very different picture than in Joomla! version 1.5.

Figure 8.3

Figure 8.3. Template Manager

The templates are still listed with a screenshot, their name, their location (site for front end or Administrator for back end), their date of creation, and their author. By clicking on the template name, you get to the really interesting information.

The Template Preview

You will notice that under the template name in Figure 8.3 there is a note that says “No preview available.” If you have already been working with Joomla!, you know that you can assign modules, which usually output dynamic contents, to certain positions. In the template itself you control where a module should be placed within the document. Its position is then determined by using CSS. The template preview gives you an overview of the position used for the module.

For security reasons, you have the option of enabling or disabling the preview. You can find the Template Options in the top right corner. When you click on the Options icon, you will see the screen shown in Figure 8.4.

Figure 8.4

Figure 8.4. Template Manager Options

Here you can enable the preview function and configure the permissions management. Once you enable the preview function, you will see, as shown in Figure 8.5, that the preview is now available.

Figure 8.5

Figure 8.5. The preview is now available.

Where in Figure 8.3 it said “No preview available” under the template name, you will now see “Preview,” which is a link that takes you directly to the preview (if Preview does not appear after you change the options, try reloading the page). If you then click on Preview, a new window pops up with the preview. All module positions assigned in the template are displayed clearly.

The latter part of the URL is particularly important: tp=1&template=beez5. This helpful function can be used not only in the back end but also in the front end, where it is even more helpful. See Figure 8.6.

Figure 8.6

Figure 8.6. Template preview

Particularly with large sites, you may see a module displayed in the front end but, for the life of you, cannot remember which module position it uses. In the Module Manager, modules can be sorted by type and position, but sometimes you still cannot find a specific module.

If you now go the relevant page in the front end and append ?tp=1 to the URL, you get a preview (of the assigned template) of the corresponding page, which tells you the position of the module you are interested in. This is shown in Figure 8.7.

Figure 8.7

Figure 8.7. Preview in the front end

You may wonder why you can enable and disable this rather useful function. Wouldn’t it be great if it was available all the time? The flexibility of the function makes it necessary to have the option of enabling and disabling it, because anyone who knows about this method can look up this information. And only rarely would you want them to. So, if you require this function: enable, look it up, disable!

Template Details

As you can see in Figure 8.8, the Template Details view also differs slightly from the previous version of Joomla!.

Figure 8.6

Figure 8.8. Template Details gives access to template page HTML and CSS files.

On the right is a list of all CSS files used in the template.

With just one click, you can edit from the administrator back end. The same goes for the internal control files in the template. Here you can edit the index.php file, the heart of the template, the error page, and print preview.

This function is useful while running the operation if you want to change something quickly. But I have to admit that I prefer editing these files directly in an editor and then uploading them to the server via FTP.

  • + Share This
  • 🔖 Save To Your Account