Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
- Index
- » MetaMod
- » MetaMod General Support
- » Template Styles
Template Styles
Template Styles
Joomla v1.7.3 Metamod v3.7
I've followed this:
http://www.metamodpro.com/metamod/recip … a-template
to get a module to display for a particular template, but in Joomla 1.7 it has styles and I need to get the name of the style not the base template.
Does anyone know the PHP to get the style name?
Paul
Re: Template Styles
Ugh, no I don't know if that's possible
Joomla 1.7 made it difficult to retrieve that information. I don't think it's even held as a style in its own right... but instead as a set of parameters for that style.
However, if you're using standard Joomla allocation of a style to a menu item, you can retrieve the style that is supposed to be allocated to that menu item (providing no other plugins have changed it).
Does that sound like it might work for you? If so, I'll give you a database query to retrieve it for the current Itemid (a.k.a. menu item).
Cheers,
Stephen
Re: Template Styles
I found a different way of doing it. The template (from http://www.youjoomla.com/) allows me to specify the menu so each style has a different menu displayed. Then I used this code, which works for me :-)
$menu =& JSite::getMenu();
if ($menu->getActive()->menutype == 'mainmenu')
{
return 90;
}
else
{
return 92;
}
- Index
- » MetaMod
- » MetaMod General Support
- » Template Styles
Board Info
- Board Stats:
- Total Topics:
- 1699
- Total Polls:
- 6
- Total Posts:
- 5967
- Total Posts Today:
- 2
- User Info:
- Total Users:
- 8021
- Newest User:
- shrutihassan193
- Members Online:
- 0
- Guests Online:
- 162
- 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