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.

 

Display a module only on a logged in user CB page

Display a module only on a logged in user CB page

Well I would like to show a module on the CB profile of a logged in user but on its profile only, not on all CB profiles

Could you help me on this ?

Thanks

activha
Beginner Modder
ranks
useravatar
Offline
7 Posts
Administrator has disabled public posting

Re: Display a module only on a logged in user CB page

ok, usually the Profile is linked to by a menu item. So the best way is often to do this:


if (
$option == 'com_comprofiler'
and $Itemid == '576'  // adjust as necessary!
and JRequest::getVar('task') == ''
) return XXX;

The Itemid has to relate to the itemid of the menu item with the "user profile" on it.
So that PHP code checks to see if you are on that menu item, and that there's no "task". If you have navigated within that menu item to other CB pages then any of those other pages will have set a "task" as far as I know.

I think that will do what you want - test and see.

Cheers,
Stephen

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:
10772
Newest User:
alton29318
Members Online:
0
Guests Online:
165

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