Selecting a Template

Templates, which are accessible from the Extensions menu in the Joomla Administrator, are probably one of the easiest things to understand conceptually in Joomla. Templates contain the code that represents your site design—it's a skin. Joomla has support both for Site and Administrator templates, which means you can have one template for your core site and something different for the Joomla Administrator. You can even apply templates to specific pages, which can be handy if you want your homepage to look slightly different than the rest of your site. Or perhaps you need landing pages for various content Sections on your site—think of a sports site with different looks for football, soccer, basketball, and baseball for instance.

Note

We cover details on how to create your own templates later in the Short Cut. Right now out intent is to just get you familiar with the important aspects as an administrator.

That being said, not all templates are created equal—and we speak from experience. As we both started using Joomla heavily, we quickly found out that some templates were not coded properly. We also found out that creating our own templates required a rather in-depth knowledge of CSS (Cascading Style Sheets), HTML, and how Joomla worked. Although many of you may have a lot of CSS and HTML experience, like we do, ensuring consistency across browsers is not always easy—especially when newer browsers, like Internet Explorer 7, introduced a whole new world of problems to many of the templates out there.

Let's spend some time looking at what you want to consider.

Considerations

While we all wan to find and use free templates, the reality is that many of the free templates have problems. Even if they were originally solid when developed, we have found that many templates are rarely updated to accommodate new versions or changes to Joomla. Over time the template becomes more and more cumbersome. With this in mind, here are some pointers when considering your template:

  • The templates that ship with Joomla by default are great in terms of functionality. If you like the way they look, then we recommend you use them or at least use them as a starting point if you want to edit to make them look like you want.

  • We have found templates that use a lot of absolute positioning as well as fixed width settings have problems with Joomla Extensions you may install. Let's say you are installing a message board extension, for instance. If your main template restricts the width to a setting that does not allow the message board extension to be properly displayed, the text could be jumbled.

  • Try to only use templates that store 100% of their formatting and layout in CSS—this will only make it easier for you to edit globally should you need to...and you probably will.

  • Not all templates properly separate the site CSS from the authoring environment CSS. This may not sound like a problem, but if your template has a solid black background, for instance, and a Section (HTML <table>, <div>, etc) in the middle that is white, and you have black text, this will look nice on the website side, but when you go to author a piece of content the black background will be displayed as you try to author the text in a black font. In short, you will not be able to see it.

  • With Joomla 1.5, Module Positions are defined from within the templates. These positions are used to specify the location of Site Modules, which we will cover in the next major area of this section of the Short Cut. You want to make sure your template provides as many Module Positions that makes sense for your site design. If you want modules, such as a user menu, to be on the left, then you need to be sure your template has a left position specified.

  • Since there were significant changes between Joomla 1.0 and 1.5, we simply do not recommend even trying to use Joomla 1.0 templates as the basis for your 1.5 installation—try only to find Joomla 1.5 templates.

Working with Templates

Later in the Short Cut, we cover more details about creating your own templates, but before you embark on that task, there are several things you need to know when working with templates within Joomla in addition to the previously mentioned Module Positions. These can be summed up as follows and can be performed by accessing the Template Manager from the Site menu within the Joomla Administrator.

  • Default: the template that is marked as the default will be used for all pages on the site except where overridden through assignment.

  • Assigned: want to assign a template only to a single Section of your site? Select the template and under the Menu Assignment Section, set the option to assign the template to a specific Menu item. Templates that are assigned to Sections of the site will have a green checkmark by them under the Assigned column of the Template Manager.

  • Edit: while you can always edit a template and its CSS directly from the filesystem if you have access, you can also edit it from within the Joomla Administrator. Simply select the template you wish to edit and click the Edit button. On the resulting screen you will have the ability to not only change any options the template may provide, such as color variation or width, but also edit the HTML or CSS directly. Once complete, click Save to immediately see your changes.

    Warning

    CSS files are often cached by web browsers, so you may have to perform a force reload (or clear your cache) for the browser to see changes you make to your CSS files.

  • Template Management: eventually you will want to either add a new template or delete an existing one. To add a new template, simply go to Extensions → Install/Uninstall → Install and using the Upload Package File section, upload the new template. To delete a template, go to Extensions → Install/Uninstall → Templates, select the template you want to remove, and click Uninstall. Please note only templates that are not in use can be uninstalled.

One other thing to note about templates is that there are also Administrator templates. While it is rare that people installing Joomla will want to create custom Administrator templates, it is possible to do so. This allows you to do things like have a custom header across the top of the Joomla Administrator pages or perhaps provide a list of helpful internal links at the bottom of the pages. This can especially be helpful if you are powering a large site with Joomla and you need to customize the editing environment to work according to your own workflow.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.220.82.93