Sie sind auf Seite 1von 40

Getting Started with Template Overrides

Joomla! Template
Template is a something which can be present as a website with the contents of database
tables. So the template itself is not a complete web site and it is only a basic foundation of the
design of a web site. So the appearance of a content management system can be changed by
using a template.

Beez Template.
Beez is a one of standard template which is created for joomla!. It gives more accessibility and
also the flexibility to the content management.

Benefits of using Beez template overrides
Since the content present in a completely separated file. Then the content can be presented
by using various layouts. So the users can use the layout as their thoughts to present the
content. So the things like font sizes are scalable. So the quality of the design can change by
using modern techniques. So the adjustments can be done according to the user needs.

It is flexible with replacing outdated technologies. For example use of table less web sites.
That can be dome with the style sheets. The style sheet is paying a major role of a content
management system since the appearance of the site change with the styles. The
confusability can be improved by using more than one style sheets.

Comfort ability with Jump labels concept

Since the linear way of presenting content has more difficulties Beez uses a concept called
jump labels. With this technique users enable to jump to the specific areas rather than
reaching the content areas in a long way.

The change of the contents with the different sixes of browser windows is a one of anonymous
problem with web pages. So the Beez uses a semi scalable layout with full width size to
overcome those problems.

Template overriding with Beez
Beez is a template which overrides some of the core module and components. The override
modules and components are kept in the beez->html folder. For example there are seven
components and five modules from core modules and components are overridden by Beez.

Go to joomla1.5 -> modules ->

joomla1.5 -> components ->

joomla1.5 -> templates ->beez->html

Example 1:-
Override newsflash module with beez.

Step 1:
Remove the mod_newsflash folder from templates ->beez->html for a while.
Then newsflash module will not override by added module with beez.
Then look in to the newsflash module appearance in the Joomla! Beez template site.

Since the removal of mod_newsflash folder from templates ->beez->html, the newsflash
module is not overridden by Beez. So the newsflash appears as it defines in the core

The page source is:

Source for horizontal newsflash:

Step 2:

Now just copy the mod_newsflash folder which we removed, to the templates ->beez->html
again. Then newsflash module will override by the newly added module with beez. Now
look in to the newsflash module appearance in the Joomla! Beez template site.

Page source:

Source for horizontal newsflash:

Summery NOTE: See the difference of news flash module with horizontal layout

With Core module With override module

So the way Beez overriding technique can understand easily by looking above two steps.

There are two different page sources. The core newsflash module uses html table techniques
to arrange data. But most of the newer sites uses table less html.
So in Beez template those out dated technologies are replaced and it uses <dive>, <ul>, <li>
tags to replace tables.

The source code of newsflash module in Beez also has many improvements than the earlier

Example 2:-
Override login module and get rounded look.

The usage of rounded corners will give a nice looking for a professional web site.
With Joomla! Templates we can have those rounded corners for the forms like login.
So I will see how we can have rounded corners for a login module with beez template.

There is a login form at the right corner of Joomla! site. By default it is not a rounded corner

So now we are going to change those corners as rounded with just a few steps.

step 1:

Go to the admin panel.

Then select Extensions -> Module Manager from menu.

step 2:

There is a module called Login form.

Click on that module.

step 3:

Now we can change the parameters of Login Form module.

Set the “_login” as a module class suffix. Save it.

step 4:

Then go to the Joomla->templates->beez->html.

There is a folder named ‘mod_login’ and within this folder there are two files named
‘default.php’ and index.html.

step 5:

Open default.php file. Wrapper login and logged from using two divs.

<div id =”login-wrap1”>
<div id =”login-wrap2”>

Then put the closing tags for <div> tags at the end of <form> tag.

step 6:
Then go to Joomla- > Extensions -> Template Manager.

Click on beez.

Then click on the ‘Edit CSS’ button which appears in the left top corner.

Select ‘template.css’ file.

step 7:

Copy the following code in to the ‘template.css’ file and save it.

[CSS code]

/* Login form with Rounded corners */

div#left div.moduletable_login {
margin-left: 10px;
background: url(../images/login_right.gif) top right no-repeat;

div#left div.moduletable_login h3 {
margin: 0;
padding: 10px 10px 0 10px;
background: url(../images/login_left.gif) top left no-repeat;

div#left div.moduletable_login div#login-wrap1 {

margin: 0;
padding: 0 0 0 10px;
background: url(../images/login_left.gif) bottom left no-repeat;

div#left div.moduletable_login div#login-wrap2 {

margin: 0;
padding: 0 10px 10px 0;
background: url(../images/login_right.gif) bottom right no-repeat;

div#left div.moduletable_login form.form-login, div#left div.moduletable_login form.log {

margin: 0;
padding: 0;
background-color: transparent;

div#left div.moduletable_login form p { margin: 0; }

[End CSS code]

The above code uses below images. The images has include to the templates/beez/images
folder as folloews.

login_left.gif image look like this:

login_right.gif image look like this:

So now refresh the Joomla! site and see the different in login form.

Example 3:-
Change the article layout.

Change the way that content appears in the front page.

The front page main article of a Joomla! beez template.

Now we want to appear both ‘Last Updated’ and ‘Written by’ high lighted texts in the
bottom of the contents. Will se how can we do that.

Step 1:

Go to the Joomla->templated->beez->com_content->frontpage.

Step 2:

We are going to edit default_item.php file.

Now we want to print the date at the top of the content and Author and Last updated values at
the bottom.

So the print options for Author and Last updated values have to add at the bottom of the code.
To do that just copy the content from line 60 to line 80 and paste them in line number 99.

After paste the content.

Step 3:

So now we don’t need to check the parameter values for Author and Last updated values at
the beginning. But the date parameters have to check at the beginning.

Select the below content.

Remove the above selected part and just put the following content to that place.

<?php if ($this->item->params->get('show_create_date')) : ?>

Then select the highlighted part from the code and remove. We want to remove ‘Author’
and ‘Last updated’ from the top of the content.

Now top article info code will appear as follows.

Now we have moved the ‘Last updated’ and ‘Written by’ texts to the bottom as follows.

Step: 4
Now we want to remove the date from the bottom. So select the code which is showing below.
There it checks the ‘show_create_date’. Since it is needless we can remove that part from the

So after remove the relevant part the code is as follows.

So now we can remove the code which is used to print the date at the bottom. In this case just
remove the high lighted part of below code from the file.

After doing changes the code will appear as follows

Now go to the front page of Joomla! with beez and refresh.

Then the front page will display the way wanted. The date will appear in the top of the content
and author and Last updated parts will show in bottom.

By following above examples it’s clear that beez used most
modern techniques with modules and components by replacing
out dated technologies. And also with beez template the content
management system becomes more flexible and accessible.