1

I have created my modules position in my template and have also declared in the XML file. Now in module manager when I choose one of my module positions and save the module, it shows it then as a Custom Position in the Module Positions select field.

Update:

I am not using any framework. Just casual joomla template. Module positions are defined in the XML and in the template's block files (so there should not be considered as custom positions) and are displayed in the Module Position filter in Module Manager normally.

But after saving a module, then it will add it also under the Custom Positions group in the filter, ending with the same module position exist twice, 1 under the mytemplate positions and 1 under custom positions.

It does make things a bit confusing.

Update 2

I just realized that this is also happening by default even with the protostar template, and probably with other templates as well. After assigning a module to position, then this position becomes available also in the Custom Module Positions. Isn't this the case also for anyone else?

2
  • In the last month I have created both J2.5 and J3.3 templates, with custom positions and they show normally in the Module Position filter. I just quickly fired up a J3.3 site and a J2.5 site, added a new position (without bothering to actually define in the template php file as thats not important for this test) and then assigned a module to that position and it appeared OK i the module filters. You using a heavily customised framework with its own module position screen that overrides the standard?
    – MOLEDesign
    Jul 29, 2014 at 10:58
  • Any chance (apologies that this may be stating the obvious, but always good to check) that you just need to purge your Joomla! Cache?
    – MOLEDesign
    Jul 29, 2014 at 11:04

2 Answers 2

1
  1. I think the <optgroup> label should be changed from "Custom Position" to "Already Used" or "Selected Positions" or something like that. To do so, create or open the file

    /administrator/language/overrides/en-GB.override.ini
    

    and add this line:

    COM_MODULES_CUSTOM_POSITION="Already Used"
    
  2. Also there is a dirty way to get rid of the optgroup by commenting this line

    $templateGroups[$customGroupText] = ModulesHelper::createOptionGroup($customGroupText, $customPositions);
    

    in

    /administrator/components/com_modules/helpers/html/modules.php
    

    and choose unique position names in your template's XML file.

1
  • I think you are right on this. They probably wanted to name this group as "Already Used" instead of "Custom Position".
    – FFrewin
    Aug 21, 2014 at 13:10
1

Try also defining your module positions by naming them in your template system language file, i.e.;

en-GB.tpl_yourtemplatename.sys.ini

Name each position like this, where in this example the module positions are header, banner and breadcrumbs and yourtemplatename is your template name ;

TPL_YOURTEMPLATENAME_POSITION_HEADER="Header"
TPL_YOURTEMPLATENAME_BANNER="Banner"
TPL_YOURTEMPLATENAME_BREADCRUMBS="Breadcrumbs" 
2
  • Thanks! I m working on a new template/site these days - I will try your suggestion.
    – FFrewin
    Aug 19, 2014 at 15:15
  • I tested this on my new template but yet, when I am choosing any of my available positions, it still appears this position as custom position.
    – FFrewin
    Aug 19, 2014 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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