Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Sobi2 Recipe to hide module on...
Sobi2 Recipe to hide module on details page
Sobi2 Recipe to hide module on details page
Hi, I just purchased the MetaModPro. It looks great from the little playing around I've done so far. Nice of you to post simple recipes to help out!
Ok so I have Joomla 1.5 & Sobi 2 directory.
I used your recipe to show a module in the category:
if ( $option == 'com_sobi2' and ($catid = JRequest::getVar('catid')) != '' ) {
if ( $catid == 17 ) return 199; /* replace 101 with module to show for category 23 */
if ( $catid == 18 ) return 199; /* replace 102 with module to show for category 34 */
}
Which works wonderfully. Of course I could already do this before I bought your module, but the big problem I have is that I have a search module, which also shows in all the listing detail pages in that category. I want the module to show in the category only. Can you help me modify this recipe to accomplish this, and once it works it could be posted on your recipe page?
Re: Sobi2 Recipe to hide module on details page
Hi kool_canuck,
are you saying that module 199 is the search module that you only want to show on the category list pages?
Assuming that's the case, here's how to rewrite your rule above so that module 199 only gets displayed on category list pages, not on the detail pages:
if ( $option == 'com_sobi2'
and JRequest::getVar('sobi2Task') != 'sobi2Details'
and ($catid = JRequest::getVar('catid')) != '' ) {
if ( $catid == 17 ) return 199; /* replace 101 with module to show for category 23 */
if ( $catid == 18 ) return 199; /* replace 102 with module to show for category 34 */
}
Hope that was what you are after - please let me know if it wasn't.
Cheers,
Stephen
Re: Sobi2 Recipe to hide module on details page
YES!! Works perfectly! This is a great Sobi2 recipe to add!
if ( $option == 'com_sobi2'
and JRequest::getVar('sobi2Task') != 'sobi2Details'
and ($catid = JRequest::getVar('catid')) != '' ) {
if ( $catid == 17 ) return 199; /* replace 199 with module to show for category 17 */
if ( $catid == 18 ) return 199; /* replace 199 with module to show for category 18 */
}
Thanks a lot!
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Sobi2 Recipe to hide module on...
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5943
- Total Posts Today:
- 1
- User Info:
- Total Users:
- 7638
- Newest User:
- moner86658
- Members Online:
- 0
- Guests Online:
- 177
- Online:
- There are no members online
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked