0
votes

I'm working with Joomla v3 and have this problem:

I have 2 modules (for example module_1 and module_2) in one position. Module_1 is above module_2 in all pages, but in one page it should be in reverse. I know I can duplicate modules and add they to new position but I just want only one module instance. So if I change this module it will be change across website.

So how to have only one module instance and apply different order in different pages?

Thanks

3

3 Answers

0
votes

You can create 2 new HTML modules and use {loadmodule module} as code and assign it on the desired position (inverted).

But in most of the cases does not work. In your case I will assign your modules position to two new positions (i.e.: assign theme to module1_position and module2_position). Then create four new html module using {loadposition position_created} and assign them on the desired real position. The four module are just for positioning and the original module are for configuration.

At the end you will have:

  • module_1 -> your module in position module1_position.
  • module_2 -> your module in position module2_position.
  • new_module1_a -> HTML module with the code {loadposition module_1} assigned to position a in all pages minus the one you want different.
  • new_module2_b -> HTML module with the code {loadposition module_2} assigned to position b in all pages minus the one you want different.
  • new_module1_b -> HTML module with the code {loadposition module_1} assigned to position b in the single page you want inverted.
  • new_module2_a -> HTML module with the code {loadposition module_2} assigned to position a in the single page you want inverted.

I hope I made myself clear ;)

EDIT: (After your comment)

In this case you can just create 2 HTML module:

  • new_module1 with the code {loadposition module_1}{loadposition module_2} assigned to all pages minus the one you want different
  • new_module2 with the code {loadposition module_2}{loadposition module_1} in the page you want different.
0
votes

You can change your template so that you have two different positions (A and B) and assign one module to each. You can then add a parameter so that for a given style the positions go either B A or A B. Then assign the appropriate style to the appropriate page for the order you want.

Alternatively, depending on your containers, it is possible you could use css to control the positioning.

0
votes

OK, so I figured it out. I'm using Joomla version 3.4.

  1. Create module globally - in my case create custom HTML module and don't assign it to any position/sidebar and show this module on every page (pages can be selected by your own but at least all pages that you want module to show up must be selected). Very important is to check 'Prepare content' ('yes' or it must be green) under Options tab.
  2. Create new custom HTML module that you want to show in position one - so select every page that you want and of course the position you want. After creating you can of course order the module as you want. In the content you need to add this code: {loadmodule custom,Name of your global module}. Very important thing is to check 'Prepare content' under Options tab again.
  3. Create another custom HTML module that you want to show in another position - do the same as in the point 2.

Now you can assign both modules to pages you want, positions you want and order it as you want. Of course if you need to use this module for another position for other pages you can create third module and do the same. Everything you need to change is the global custom HTML module. That's all. Hope it was helpful for anyone.