Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Show module with module
Page:
1
Show module with module
Administrator has disabled public posting
Re: Show module with module
That's an interesting scenario. Actually there's a recipe in the documentation for achieving the reverse of that (displaying a module on every page where another specific one is NOT assigned). This is just for Joomla 1.5:
http://www.metamodpro.com/metamod/recip … not-appear
So a small change to this will allow you to assign a module to every page where another module IS assigned. You could do it like this:
Code:
$moduleid = 23; /* the module we are checking for. Customise this! */
$sql = 'SELECT count(*) as c from #__modules m, #__modules_menu mm ' .
'WHERE mm.moduleid = m.id ' .
'and m.published = 1 ' .
'and (mm.menuid = ' .
(int)$Itemid . ' or mm.menuid = 0) and mm.moduleid = ' . (int)$moduleid;
$db->setQuery( $sql, 0, 1 );
$row = $db->loadObject();
$assigned = ($row != null and $row->c > 0);
/* replace 101 with module id to display when the other module IS assigned to this page */
if ($assigned) return 101;
Administrator has disabled public posting
Page:
1
- Index
- » MetaMod Pro
- » MetaMod Pro General Support
- » Show module with module
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8028
- Newest User:
- musial8334
- Members Online:
- 0
- Guests Online:
- 149
- 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