2

I want to load a module position twice with different module style, but strangely the style on the 2nd position load is always following the 1st one.

The code is like this :

<jdoc:include type="modules" name="position-7" style="raw"/>
<div> ....
....
<jdoc:include type="modules" name="position-7" style="xhtml"/>

So, the second position-7 always loads the modules using 'raw' style not xhtml. Is it a joomla bug or it's indeed designed like that?

2

Why are you trying to define the same position twice? I doubt Joomla supports multiple positions with the same name. How is that supposed to work?

You should instead give the second position a different name. Then this one can have another default style.

  • Thanks for your answer! I was actually trying to create a responsive mega menu where all same menu items and modules automatically converted/displayed in the offcanvas area when user visiting the website from mobile devices, so in this case I need to call the modules twice. – webchun Jun 28 '15 at 4:05
  • That doesn't sound like something which is supported by Joomla. Make two positions and duplicate the modules. They can point to the same menu. – Bakual Jun 28 '15 at 12:35

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.