Keyword

Little CSS K2 sub template cleverness

  • Alan Sparkes
  • Alan Sparkes's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 6 months ago #94659 by Alan Sparkes
Little CSS K2 sub template cleverness was created by Alan Sparkes
IF you want to add some sub template specific CSS class or id - and I do! - then you can use this

 

Add to your override sub template :

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



 

Then to get css ids/classes specific to a sub template you can

do 

<div id="<?php echo $K2Globalparams->get('theme'); ?>" class="lander">

 

The id will be your theme name.

 

HA!

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

More
13 years 6 months ago #94660 by BRENO T L DE SOUZA
Replied by BRENO T L DE SOUZA on topic Little CSS K2 sub template cleverness
where i need to insert the tag?

thanks

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

  • Alan Sparkes
  • Alan Sparkes's Avatar Topic Author
  • Offline
  • Premium Member
More
13 years 6 months ago #94661 by Alan Sparkes
Replied by Alan Sparkes on topic Little CSS K2 sub template cleverness
Depends what your K2 template is like.

IF you think that the standard K2 item.php template has a container tag 

<div id="k2container>

Then a sub template could have <div id="[template name]" 

using this approach.

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


Powered by Kunena Forum