Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

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 ) {}

ehcanada
Beginner Modder
ranks
useravatar
Offline
4 Posts
Administrator has disabled public posting

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?

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3313 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1679
Total Polls:
6
Total Posts:
5913
Dormant:
User Info:
 
Total Users:
10734
Newest User:
gudad2
Members Online:
3
Guests Online:
157


Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked