Hi, I am facing the need to load certain modules when on K2 itemlist viewing but not when a child item is clicked.
I’ve found that a nice approach would be on the layout.php file, when you define the positions array, to run a test of the Option and View variables and depending on the value, I can assign different positions.
This is some sort of Advanced Module Management or Metamod without the hassle to configure them all the time from the module manager. You just standardize on, for example, a “leftitem” position for loading things under “left” position when in “item” view, and “left” for else. You can play on which positions you load so you could always load “left” and when in article view you load “leftitem”. This last approach is a bit involved on the current T3 logic. The alternative would be to create a copy of the module so it is on both positions.
Another thing I did on standard templates, was to dynamically test and load positions like “contentitem324”, meaning option=com_content, view=article, id=324. So this way I could ensure a specific module displays only for article 324 on a specific position. Again, clean with no metamod internal tests on php and if there is nothing to show, then no extra space is showed or accounted for i the template.
I was wondering if any of you used this approach or any other that makes things easier for the webmaster to manage a big collection of modules.
Hope this enlightens someone and perhaps others found better solutions.
Willie.