I am converting theme from HTML to Joomla. When I have defined position in below manner, It gave me nothing as output.


But When I changed that into following code, Everything is working fine.


As I am new to joomla, I don't have any idea why is it so.

So anyone can tell me why position works in that manner? Can't we define our own position in Joomla? Because I have seen themes which have their own defined position and they were working perfectly.Then Why my position did not work?

  • If you are changing the XML file once the template is already installed, go to your template manager, select your template, then click "save" without making any changes
    – Lodder
    Oct 2, 2014 at 9:54
  • My default positions was top_header, left etc. I uploaded my zip with this positions only.Then Would it work ?
    – Twix
    Oct 2, 2014 at 10:05
  • Would you be able to provide a zip file for your template by any chance? I've honestly no idea why something which should be pretty straight forward isn't working. It could be down to various reasons.
    – Lodder
    Oct 2, 2014 at 10:08
  • Are you sure you are also setting the modules to appear in the new template positions? Oct 2, 2014 at 10:55

2 Answers 2


Have you based your new template on an existing template?

There are several conditions that must be met in order to display modules in your new positions.

  1. /templates/YOURTEMPLATE/TemplateDetails.xml
    You must define your module positions in this file. Your code in the question is correct.

  2. /templates/YOURTEMPLATE/index.php
    The positions must be defined in your index.php file. Place this code wherever you want your module positions to appear:

    <jdoc:include type="modules" name="top_header" style="xhtml" />

    (Replace "top_header" as needed)


This code will be replaced with your module content if a module is published to this position.

  1. Publish your modules
    Now publish a module (or several) to the position top_header, and make sure you set "Menu Assignment" -> "Module Assignment" to the pages where you want the modules to display. Also make sure "Status" is set to "Published".

Module Assignment

Most of these steps are basic, but I'm listing them because it's easy to overlook something.


The XML file probably doesn't accept underscores _ in the module position name. Try using "top-header" instead of "top_header".

  • Do you have any source for this? I know it's not common to use _ in module position names, but I just tested on Joomla 3.3, and it seems to work fine.
    – johanpw
    Nov 3, 2014 at 12:14
  • @johanpw sadly, I can't find any sources online. But I remember having the same problem and fixing it by using a hyphen instead of underscore.
    – Robin Hood
    Nov 5, 2014 at 8:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.