Keyword

How to get rid of modules when item is displayed?

  • Sławomir Kamiński
  • Sławomir Kamiński's Avatar Topic Author
  • Offline
  • New Member
More
10 years 1 month ago #131136 by Sławomir Kamiński
How to get rid of modules when item is displayed? was created by Sławomir Kamiński
I've got a catalog of companies. Its page contains two modules on the top:
* K2 Tools (Tag cloud),
* K2 filter.
When I make a search (or select any "category" from the tag cloud), I get a list of items. Now when I click on link at any of the listed items, requested item will be displayed. But on the top of the new page there still will be two modules mentioned above.

What is the best solution to change this behaviour, so the page contains only selected item, which would be displayed right from the top of the site (without modules)?

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
10 years 1 month ago #131137 by Krikor Boghossian
Replied by Krikor Boghossian on topic Re: How to get rid of modules when item is displayed?
You can either do it from your template.
$option = JRequest::getCmd('option');
$view = JRequest::getCmd('view');
 
if ($option != "com_k2" && $view != "item")
{
// Module code here
}

or use an extension like Modules anywhere.

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

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

  • Sławomir Kamiński
  • Sławomir Kamiński's Avatar Topic Author
  • Offline
  • New Member
More
10 years 1 month ago #131138 by Sławomir Kamiński
Replied by Sławomir Kamiński on topic Re: How to get rid of modules when item is displayed?
It seems Modules anywhere solves my problem. Thank you for your help!

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


Powered by Kunena Forum