How to add the breadcrumbs or date to your template?

05 August, 2008

Robert Gavick

What is a breadcrumbs? This is a navigation, you can see on the websites the “Home » Joomla!Overview » What’s New in 1.5?” text links that show where you are in the website hierarchy. If your template does not attend the breadcrumbs you can add this very quickly.

First open the index.php and add wherever the following code:

<jdoc:include type="module" name="breadcrumbs"/>

Then you can change the appearance of breadcrumbs adding to the template.css file the following classes:

span.breadcrumbs {}
a.pathway {}

The same way you can display the date on your website. Open the index.php and add the following code:

< ?php echo JHTML::_('date', 'now' ) ?>

Well done!

2 responses to "How to add the breadcrumbs or date to your template?"

19/08/08

Hi, I liked this date tip a lot, so I decided to elaborate on it a little bit by adopting it to take the time from the active language setting in Joomla 1.5.X

In this way you get the date format in your own language.

Insert the code in your template ‘index.php’.
You place this where you want it to show up.
Maybe in the header or body section.

item->created, JText::_(’DATE_FORMAT_LC’)); ?>

The result? Well, if you’ve chosen English:

“Tuesday, 19 August 2008″

The date format in Joomla is picked up in the active language file for the frontend. In this case: ‘en-GB.ini’. You can choose from several different formats like LC, LC1, LC2.

Enjoy!

Regards
Akerman

19/08/08

item->created, JText::_(’DATE_FORMAT_LC’)); ?>


Hmm, code seems to get messed up in comments here.

Leave a comment

Name : 
Mail : 
Website : 
Message :