Common Strategies for placing a text in the footer

PDF Print E-mail
Share
Thursday, 02 July 2009 21:26
There are few strategies for placing a text in the footer which may apply to your case and assist you in understanding the way to removing or editing it. Before we're going into the details of each strategy we need some background.

Each template set lives in its own sub-folder within the /templates folder
A template mainly consists of an images folder, a css file folder and a main file index.php.
The file /includes/footer.php is part of the core distribution of the script.
The index.php file includes the footer.php.
footer.php itself retrieves the Copyright text from the languages files.

1. Within your template's index.php file.

Editing your template's index.php so as not to include includes/footer.php by finding and remove this line from the file /templates//index.php. Instead simply place your text directly into the template.
Pros: Quick easy and efficient. It will also survive any upgrade of the core installation.
Cons: If you change templates, or use multiple templates you will have to replicate your edits throughout multiple templates.

2. Within the /includes/footer.php file.

Editing includes/footer.php so it does not retrieve the copyright info from the language files. Instead enter your own details here.
In order to do so find and remove the lines containing variables "COPYRIGHT", "URL" or similar from the /includes/footer.php file, and replace with your own html or php.
Pros: Again fairly quick and easy - possibly more efficient as the info will be available throughout multiple template sets.
Cons: The includes/footer.php file is part of the core distribution - it gets overwritten when you upgrade your version of CMS.

3. Within the language files.
Editing the language files directly (usually /languages/english.php) - so that footer.php retrieves your info.
Pros: does the job
Cons: less transparent to anyone who takes over from you as editor. Also prone to being overwritten when you upgrade your version of CMS.


Some people have suggested improving the second option by moving the includes/footer.php file, for example into your template's folder, and editing the template to include this file.
Pros: still fairly quick and easy, and will survive an upgrade of the core CMS.
Cons: only compatible with templates that have been edited to work this way. Other templates may cause an error when the file is not found in its default location.
 

Comments  

 
0 # 2010-01-27 19:48
Thanks for some new information!

But most of Joomla! templates have a module position "footer".
If you know some HTML you can easy place there a module with the text that you need.
Reply | Reply with quote | Quote
 

Add comment


Security code
Refresh