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.

 

show module on Sobipro and joomla homepage

show module on Sobipro and joomla homepage

How to combine recipes to show module on Sobipro and joomla homepage?

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

Re: show module on Sobipro and joomla homepage

Hi ehcanada,

If you want the modules to be on ALL sobipro pages (not just specific entry pages etc) then you can do it by detecting the com_sobipro $option:

if ($option == "com_sobipro") return XXX;
// replace XXX with id of the module to display

Then you just need to add the detection for the home page. That's going to depend on exactly what type of home page you are using - e.g. is it a particular article?

Could I suggest that you switch on MetaMod's Advanced Debug mode, view the front page, and take a copy of the output from MetaMod? Paste it in the forum here and I'll advise on how to integrate that with the sobipro detection above. It will be very simple.

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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: show module on Sobipro and joomla homepage

Hi Stephen,

here is the code
display on this page
if (
$option == 'com_content'
and $view == 'article'
and $id == '49'
and $Itemid == '21'
) return XXX; /* replace XXX with the module ID or position to display */

and this page
if (
$option == 'com_content'
and $view == 'article'
and $id == '586'
and $Itemid == '2162'
and $jinput->get('format') == 'html' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */

this page
if (
$option == 'com_content'
and $view == 'article'
and $id == '334'
and $Itemid == '992'
and $jinput->get('format') == 'html' /*!*/
) return XXX; /* replace XXX with the module ID or position to display */

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

Re: show module on Sobipro and joomla homepage

Can I please get a solution for this?

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

Re: show module on Sobipro and joomla homepage

Oops, thanks for the reminder about this thread.

Ok, so I think you're saying you want the module to appear on 4 (types of) pages:

1 - all sobipro pages
2, 3, 4: the individual article pages you gave the snippets for above. I imagine that at least one of these is your home page, plus 2 other pages?

So to combine these, I'd do this:

if ($option == "com_sobipro" or $content_genius->check("article_id = 49, 586, 334")) return XXX;
// replace XXX with the id of the module you want to display on these pages.


I trust that will do what you want!
Happy Christmas smile
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
3312 Posts
User info in posts
Administrator has disabled public posting

Re: show module on Sobipro and joomla homepage

You e-mailed:

it's only supposed to show on the category pages of SP and the articles with the Ids

Ok, so here's what to do:

Code:

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 XXX;
  // replace XXX with the module id to use for SOBIpro category pages
}
catch ( SPException $x ) {}

// now check for the article pages:
if ( $content_genius->check("article_id = 49, 586, 334")) return YYY;
// replace YYY with the module id to use for the article pages
// it can be the same as for the SOBIpro pages if you want.

Hope that's what you're after!
Best regards
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
3312 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1667
Total Polls:
6
Total Posts:
5909
Posts this week:
1
User Info:
 
Total Users:
10112
Newest User:
chris28464
Members Online:
0
Guests Online:
112

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