Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » MetaTemplate Pro and ZOO
MetaTemplate Pro and ZOO
MetaTemplate Pro and ZOO
Hi there,
I have a question about ZOO and MetaTemplate Pro: Is it possible to assign different templates based on different instances of a ZOO app? For example, if I have two blog apps configured within ZOO, to give each one a different template. The only way that I can see at the moment is to include the category ID from the URL as a 'contains' rule, but unfortunately, there are instances where ZOO drops the category ID (for pagination for example) and also, I would like to take advantage of the fact that ZOO 2.2 is more (or less!) compatible with SH404.
Any advice appreciated!
Thanks.
KHD
Re: MetaTemplate Pro and ZOO
Hi,
this is an interesting situation because if the menu item links directly to a Zoo category/instance, then the URL itself does not contain the application or category id. Therefore we have to get that info from the Menu system.
This technique will work as long as the category id or application id are not somehow set in the URL. That may be able to happen if there are links to a different application while inside a certain menu item, but I don't know if that happens or not.
In this example I will not show how to detect a different category id in the URL - I will assume that you have followed a menu item to a particular Zoo application.
if ( $option == "com_zoo" ) {
$menu =& JSite::getMenu();
$params =& $menu->getParams( $Itemid );
$appid = $params->get("application");
if ($appid == 2) return XXX;
// replace XXX with module id of the module you want to display in Zoo application #2.
}
Hope that helps,
Stephen
Re: MetaTemplate Pro and ZOO
Oh hang on... I answered the question while thinking about MetaMod (controlling modules). It's only slightly different when dealing with MetaTemplate Pro and templates.
So, use the following:
if ( $option == "com_zoo" ) {
$menu =& JSite::getMenu();
$params =& $menu->getParams( $Itemid );
$appid = $params->get("application");
if ($appid == 2) return true; // <-- change the application id to check here.
}
This way, if the application id is 2 then this MetaTemplate rule will SUCCEED - therefore, set the desired template in the SUCCEED action.
Cheers,
Stephen
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » MetaTemplate Pro and ZOO
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 2
- User Info:
- Total Users:
- 7658
- Newest User:
- carre82601
- Members Online:
- 0
- Guests Online:
- 193
- 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