Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » hide on sp entry pages
hide on sp entry pages
hide on sp entry pages
i am using this to show the module on certain pages, but it also shows on Sobipro details pages, that link from the categories.
Please advise how to hide it on SP details pages?
if ($option == "com_sobipro") try {
$ob = SPFactory::object( SPRequest::sid() );
$type = $ob->oType;
/* now test for different types. You can test for "entry",
"section" or "category". */
if ($type == "category") return 851;
}
catch ( SPException $x ) {}
Re: hide on sp entry pages
Hi ehcanada,
sorry for the delay in my response - I have been overseas for a few weeks.
I've just installed the latest version of SobiPro in order to test this out.
With the test data, I set up a menu link to Category:Communications.
When I follow the menu link, it leads to the directory page, in the "N" alphabetic section, and shows the "stub" for the "N-Communications" entry.
On this page, $type (from the code you quoted) is "category"
When I click on the entry to get the full entry, on that page $type is "entry".
Is this the same for you? As far as I can see the code is working as it should. But perhaps you are expecting the type to be "entry" when it shows an entry stub on a category page?
- Index
- » MetaMod
- » MetaMod Favourite Recipes
- » hide on sp entry pages
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:
- 1
- Guests Online:
- 157
- Online:
- moner86658
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked