Sometimes web designers need to access a page class suffix from directly within a template. A common reason to do this is to assign unique styles to individual pages linked from a menu (e.g. to change the dominant color on that page). By default Joomla applies the page class suffixes only to limited areas of a page, which often doesn’t offer enough flexibility. However, by making some simple changes to your template you can take advantage of the cascading nature of stylesheets to apply unique styles to any element on a page.
First, we need to find out what the page class suffix is for the page we are visiting. To do this, you will need add some code to your template:
- Open your template’s index.php file (located in /templates/*template-name*/)
- Find the tag in the index.php, near the top area of the template
- Above this, insert one of the following code blocks (Either of the following options will work fine in most cases. However they work slightly differently, so in certain cases your needs may dictate a specific choice.)
Template conditional code.
There two types of Joomla conditions
1. Module count conditions
2. Parameter Conditions
Joomla module count conditions are base on whether a module name position is active.
Modules are tied into the menu system in a few ways but I’m going to mention only the basics
for now. So you can understand how module count conditions work with the menu system.
Modules can be assigned to show and hide based on the location of the user or access level.
To view module assignment control go to the Module Manager administrator.
Click on any module and scroll down to see the Menu Assignment Controls.
The default Joomla data install uses three menus Mainmenu, Keyconcept, ExamplePages.
At this point the Menu Assignment Control module will show on every page on your site.
Below is a cutout of a Joomla 1.5 Template structure.
The chart below will give you a quick overview of what each file does.
There are few set rules for Joomla Templates as to what files you can add. Our Joomla Template Kit adds files and breaks down files into logical order when it comes down to
the CSS files. Not all the files are needed in a live template.
The default Joomla Template for Joomla 1.5.X
In the following section I will be discussing Joomla templates more in depth.
I will discuss the different types of templates that Joomla supports.
In my opinion there are four types of Joomla templates.
1. Standard Template
2. Template Override
3. Conditional Template
4. Legacy Template
So what is a module?
By the very name module you would think that it is a type of extension which it is and it isn’t.
I can’t think of one way just to describe a module because there so flexible.
Modules are tied into the Joomla template system at design time by adding a module tag to your template.
Joomla has both Front End & Back End components but the real question here is what is a component?
A component is an application within the Joomla framework some examples are the Joomla article system “com_content”, banners, menus, polls, links and contacts.
Some components are rendered in your Front End template as content for example articles. Others are used in the backend to manage things like user accounts.