How to edit a Joomla template to publish a module in a new position.
There has been a number of questions to me, along with a few posts wondering how to get ImageSlideShow to appear in certain locations. Typically the question has bee raised because the particular template being used does not have the capability to publish modules at the required postion.
How do you know what positions are available in a template?
The two easiest ways are as follows
- Add ?tp=1 to the end of the url that you use to display your site. For example http://briask.com/cakes/?tp=1 will display the default Joomla! template on my demo site with the “position” names (and “style”) in red at the relevant locations. So you will see “positions” like top, user3, left, right, etc.
- You can also look at the templateDetails.xml file which will list the “positions” available, look for the positions element. The template details for my demo site is at http://briask.com/cakes/templates/rhuk_milkyway/templateDetails.xml .
Note that the names of the positions do not have to coincide with actual positions on the template. This is all fine if there is a supported postion at the location you want to display ImageSlideShow, what you need to do is modify the module details in the admin screens, select the position you want and you are complete.
But what do you do if there is not a supported position at the location you require? Maybe a static image is displayed there and you want to replace it with ImageslideShow. Follow these steps and you will learn what to do.
- Add ?tp=1 to your url to check if the banner/logo image is in a “position”.
- If there is not you will need to add one to the template so that the module can be published. Make a backup of your template directory before you edit any files, just in case!
- Edit the templateDetails.xml file in your templates directory in a text editor. You should find a <positions> element with a list of <postion> elements. Add a new position maybe call it ”posISS”. You should end up with a section in the templateDetails file that looks something like this:
<positions>
<position>posISS</position>
<position>left</position>
<position>right</position>
<position>top</position>
<position>user1</position>
<position>user2</position>
<position>footer</position>
</positions> - Now need to edit the template itself so it will display modules at the posISS position. Edit the index.php file, find the location at which you want to publish the module and add the following :
<jdoc:include type=”modules” name=”posISS” />
This tells Joomla to publish any modules that are configured for the “posISS” position here. Save your changes.
- Make sure that you now set the ImageSlideShow module to display in postion “posISS”, making sure that no other modules are published at that position. Once enabled and you refresh your site, you should now see ImageSlideShow at work in that position.
This rather simpflies the process as you may find that you need to remove elements that already exist at that position like static images, logos etc. May also be required to fix the CSS that is controlling the display of elements arond that position also. But this should give you an idea of what to do. If you have any questions or queries on this, hop over to http://forum.briask.com and drop me a post about it.
End of life announced for Joomla 1.0.x
Have to say I’ve never installed Joomla! 1.0.x, never been asked to support it and now never will… The Joomla! team have announced end of life for J! 1.0.x. July 22 2009 will see the end of official support for that version.
So if you are on J1.0.x and it does have a huge install base, you need to start thinking about migration to J1.5 or maybe even J1.6 although I’m not sure when that version is coming out.
Interesting point from xkcd
OK Computer! Just start already…
My long suffering Dell is giving up the ghost. The main hard drive has packed up and left… the backup thankfully is alive but is not bootable so kinda hard to actually make any use of it… It’ll be a while before I can get a replacement and get my environments back up and running.
What a to-do about what to do!
Since coming back from vacation I’ve been playing around with some ideas on what I should spend some time on next.
ImageSlideShow probably needs a minor update to round out its functionality and allow people to tweak more to their liking. Might also review the code as it was pretty much the first piece of Javascript/PHP I’d ever written so bound to be room for improvement.
Some ideas of galleries, site statistics, weather components have been floated, investigated and are now sinking rapidly! Look like too much time needed to invest in them to produce a quality component. I only have a few hrs at night to do this and Ido have a life too!
One thing that keeps sticking in my mind is that I’m here learning Joomla!, working through components, plugins etc and wanting to learn more about it but yet I use WordPress for this blog! Might have to change that…
Before I change it though I really want to work on how the site looks. Currently using a free wordpress theme from Brian Gardner specifically his Revolution Blog theme which, from looking at the code is well thought out and well crafted theme. I haven’t spent much time working with CSS, HTML or templating in Joomla! so think I’ll make that my next project, to design a new look for the demo site and create a new template for it, lets see how it goes ![]()















