Keyword

Module showing in category menu vs. item

  • Dan Peschio
  • Dan Peschio's Avatar Topic Author
  • Offline
  • New Member
More
12 years 2 months ago #101225 by Dan Peschio
Module showing in category menu vs. item was created by Dan Peschio
I have a module that I want displayed in the main category menu list, but I don't want it to show when the item is displayed singly. Its a scroller of featured articles that I only want at the top of the main menu page.

The main menu item is a K2 'Latest items from (one or more) users or categories' and I have the module linked to this menu item. When an item in the category list is clicked, the single item pages show the module as well. How can I have it NOT display on the single item page?

The site is under development and behind a log in. If need be i can provide temporary credentials.

Thanks in advance,

dp

Please Log in or Create an account to join the conversation.

More
12 years 2 months ago #101226 by Lefteris
Replied by Lefteris on topic Re: Module showing in category menu vs. item
Hi. A module is assigned in pages based on the menu. So if you have assigned in the main page then the item pages will inherit the Itemid. One quick solution is to handle this in your template doing something like:
<?php if(JRequest::getCmd('option') == 'com_k2' && JRequest::getCmd('view') == 'latest' ): ?>
<jdoc:include type="modules" name="YOUR_MODULE_POSITION"/>
<?php endif; ?>

This will only load the "YOUR_MODULE_POSITION" position when you are under K2 Latest view.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum