Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Mosets featured listings recipe?
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!
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
- Index
- » MetaMod
- » MetaMod General Support
- » Mosets featured listings recipe?
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5942
- Posts this week:
- 2
- User Info:
- Total Users:
- 7628
- Newest User:
- horlogekorting34
- Members Online:
- 1
- Guests Online:
- 133
- Online:
- uistr4qx
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked