test
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • willyram Friend
    #153847

    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.

    Saguaros Moderator
    #354108

    Hello willyram!

    This is a good idea on the modules management, but this way should applies for website having many complex functions in the showing modular s, if we have not got not good acknowledge of php language and joomla concept, we could not control them in good :). And this ways is easy conflicting with the Menu Assignment feature of the module, because based on the value of the ItemId parameter ( is id of menu ) the joomla system automatic loads modules follow to it and display them in assigning positions.

Viewing 2 posts - 1 through 2 (of 2 total)

This topic contains 2 replies, has 2 voices, and was last updated by  Saguaros 14 years, 3 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum