How to add a new module position.

Everything to do with Joomla! 1.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Joomla! Apprentice
Joomla! Apprentice
Posts: 18
Joined: Tue Mar 29, 2011 2:51 pm

Re: How to add a new module position.

Postby tschieb1 » Fri Jun 03, 2011 11:04 pm

Thank you very much !!!

GameDaddy wrote:First thing you'll want to do is go to the templateDetails.xml and add your new position. Simply insert a line about here in the code:

Code: Select all


Next, you'll want to go to the Module Manager and map one of your modules to your new position. Just as an example, in the Rhuk Milkyway template the Newsflash module is mapped to the top position... which in that template is inserted at the top of the index.php file next to the logo which also is mapped to the Top position in the Index.php file.

Just to clear up this confusion, With the Rhuk Milkyway template, the logo and the top module is actually loaded into the template by the index.php with the following css & command:

Code: Select all

<div id="logo"></div>
    <jdoc:include type="modules" name="top" />

When you go to Extensions > Module Manager and look for the top module, you won't find it. You won't find it in the plugins either. This is because the Top module is actually part of the Joomla! core code.

The css for the div id logo loads the actual logo image from the template.css style sheet while the newsflash items are loaded by the top module, which is invisible being a part of the Joomla! core and all.

Instead of using css to load our logo, we are going to replace that Top module with a completely new module that only displays our logo graphic... ready?

First use the media manager in the control panel and upload the image you want to use for your logo. Next we are going to create a Module that holds that image.

Extensions > Module Manager > New

choose the Custom HTML option by selecting the radio button.

Title: topper
Position: mynewpositionhere

Scroll down a bit until you see Custom Output... go to the bottom of that. See your Image button? Click it. This will load the media manager and allow you to place an image in the module, in your case, choose your logo.

Insert your logo by clicking the logo file and clicking insert from the upper right of the now opened media manager. Apply and Save your changes.

Finally, we are going to add the code that serves up the logo image with your template, Open up the index.php file

Extensions > Template Manager > YourTemplate > Edit > EditHTML

and add the following code where ever you want this module (and your logo) to appear:

Code: Select all

<jdoc:include type="modules" name="topper" />

Apply and Save your changes. Preview your work!

If you are actually doing this using the Rhuk Milkyway template for example, you need to remember to disable the newsflash module and remove the Jdoc statement that loads the Top module.

Cheers! ;)

Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Aug 19, 2011 9:47 am

Re: How to add a new module position.

Postby guty » Fri Aug 19, 2011 9:53 am

guys what did i miss?? i already added these codes to the files below, but still i'm not seeing the module in the added module position.

file: TemplateDetails.xml

file: index.php
<td><div id="bookmarks" ><jdoc:include type="module" name="bookmarks" /></div></td>

Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Sep 12, 2011 5:18 am

Re: How to add a new module position.

Postby bunswap » Mon Sep 12, 2011 5:26 am

i am using jateline ii template , i have created two new position ,this postion are shown when i check the frontpage with "http://localhost/gujrati/?tp=1"
But when i try to publish module its not publishing in that area,
i have add the module postion in index.php in a div
add the position in xml file and written the css still not getting it .

Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jul 04, 2012 10:52 am

Re: How to add a new module position.

Postby JagPHP » Wed Jul 04, 2012 11:05 am

I am new to Joomla, trying to create my own template which is partially done. When I go to admin part to publish modules it shows number of positions however I declared few of them in templateDetails.xml
Here are the declared positions:

And the list of positions showing is:
and so on... there are almost 30 showing in the list
Note: there is only one template selected from the list which is my custom template which I named as Jagcustom

I am not able to locate from where exactly these positions are listing...

Thanks for all, who is reading this article and especially those who is trying to reply on this post...


I've been banned!
Posts: 20
Joined: Mon Nov 19, 2012 4:15 pm

Re: How to add a new module position.

Postby setx » Fri Jul 19, 2013 11:04 pm

How can I define a template in my position?
For example: user1-2-3-4
As defined in the module positions are only for display on the home page to select other pages altitude assigned to them is not empty?

I've been banned!
Posts: 29
Joined: Sun Aug 18, 2013 11:23 am

Re: How to add a new module position.

Postby kardinol » Sun Sep 15, 2013 1:43 pm

I had the same question!
By reading this article, my problem was resolved
You can read the article here:
How do you add a new module position?

Return to “Templates for Joomla! 1.5”

Who is online

Users browsing this forum: No registered users and 5 guests