Keyword

K2 Subtemplate customization

More
14 years 9 months ago #71876 by Buddy Q
Replied by Buddy Q on topic K2 Subtemplate customization
Isn't the problem with this method that it will be overwritten if you upgrade the plugin?

Buddy

Olivier Nolbert said:Hi everyone,
here's what i've done to load a specific template css file :

In the file 'plugins/system/k2.php' / function 'onAfterDispatch()' / Line 61,

I've added the lines :

$params = &JComponentHelper::getParams('com_k2');

if($params->get('theme'))
{
$doc =& JFactory::getDocument();
$doc->addStyleSheet(JURI::base().'templates'.DS.$mainframe->getTemplate().DS.'html'.DS.'com_k2'.DS.'templates'.DS.$params->get('theme').DS.$params->get('theme').'_style.css');
}

This enables to load the css file which name is _style.css (where is your k2 template name.

Hope It will help...

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum