Keyword

Prevent module from appearing on each tag listing page

  • Goble002
  • Goble002's Avatar Topic Author
  • Offline
  • Premium Member
More
1 year 1 month ago #179251 by Goble002
Hi,

I have a menu item for a tag. I have assigned a module to appear for that menu item. However the module will also appear on page 2,3 and so on. Is it possible for the module to appear only on first page.

In my scenario I want to provide a description (introduction text) using that module about the tag listing but it's irrelevant that the same description appears on the other pages. 

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

More
1 year 3 weeks ago #179286 by JoomlaWorks
The easiest way is to create a module template override and add a check for the pagination variables. If they are present in the URL, then the module is not shown.

So wrap the module's override with something like:

<?php if (JRequest::getInt('start', 0) == 0): ?>
<!-- module override HTML goes here -->
<?php endif; ?>

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

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

  • Goble002
  • Goble002's Avatar Topic Author
  • Offline
  • Premium Member
More
1 year 3 weeks ago #179292 by Goble002
Thanks Fotis,

In the meanwhile I found a solution from Advanced Module Manager from Regular Labs

I'm posting here since it might help others.

Use the tab for the module you want to display to Exclude URL which matches for example: "/beaches ?"

This will include mysite.com/beaches
but will exclude page 2 with URL mysite.com/beaches?start=20

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


Powered by Kunena Forum