Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Custom Layput for Articles ?
Custom Layput for Articles ?
Re: Custom Layput for Articles ?
Hi Markus,
So far, this is unexplored territory This functionality is not built in to Chameleon, and I've had to look carefully inside Joomla to find some work-arounds.
Here's what I found:
1 - if the article is directly linked from a menu item, you can use this in the SUCCEED action in Chameleon to set the new layout. The layout is made of 2 parts: the template name and the name of the file with the alternative layout.
$app = JFactory::getApplication('site');
$active = $app->getMenu()->getActive();
$active->query['layout'] = "beez_20:alternative";
2 - if the article is not directly linked from a menu item, then as far as I can see there is no way to do the override without hacking core Joomla. This is because the parameters for the item are taken fairly directly from the database, and I can't find any way to intercept these to insert a new parameter value.
Cheers,
Stephen
- Index
- » Chameleon / ChameleonLite
- » Chameleon
- » Custom Layput for Articles ?
Board Info
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked