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.

 

Mosets featured listings recipe?

Mosets featured listings recipe?

Hi there!

I think I posted in the wrong category earlier... sorry... I'm struggling with putting together a recipe for Mosets Tree.  I'd like to have a module appear on all site pages *except* listings in Mosets Tree that are "featured". 

If you can point me in the right direction I'd be eternally grateful.

Thanks you so much!

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

Re: Mosets featured listings recipe?

Hi,

I am going to have a stab at this based on some info gleaned from previous posts, because I don't have a copy of Mosets to test with directly.

$show = true; // sets as default, and we'll set to false if we are on a featured page
if (
  $option == 'com_mtree'
  and JRequest::getVar('task') == 'viewlink'
  and JRequest::getVar('format') == 'html'
) {
  $link_id = (int)JRequest::getVar('link_id');
  $db->setQuery( "SELECT link_featured  "
  . " FROM (#_" . "_mt_links)"
  . "\n WHERE link_published='1' AND link_approved > 0 AND link_id='".$link_id."' "
  . "\n LIMIT 1"
  );
  $result = $db->loadResult();
  if ($result) $show = false;
}
if ($show) return XXX;
// replace XXX with the module id of the module you want to show on all
// pages EXCEPT the featured item pages.


I hope that works and helps... please let me know if it causes an error or fails in any way. It might be quicker for me to log into your site and experiment with this to get it right, since I don't have mtree myself to test with.

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

Re: Mosets featured listings recipe?

This works smile  Thanks a million.  (I did not see your reply, and cobbled something together that worked until the recent Mosets Tree update broke it.  But this one works like a charm!)  smile

zelena
Beginner Modder
ranks
useravatar
Offline
4 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:
153

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