We moved to new unified forum!

Please post all new support queries in our New Forum.

T3 Community Discussion & Support

Let's build the best free Joomla template framework, together!
  1. Lee Tempest
  2. Sherlock Holmes
  3. General Discussion
  4. Monday, 05 October 2015
  5.  Subscribe via email
I have a T3 template installed on my site. I'm using two sub version of the template for specific menu items. So in the backend I have three template styles.

What I would like to do is add a template specific class to either the <html> or <body> tag so I can assign CSS to those specific pages displaying the template.

I would rather do it this way than add a page class to every menu item.

Can this be done via php in the tpls files?

Thanks

Lee
Comment
There are no comments made yet.
Accepted Answer Pending Moderation
0
Votes
Undo
Gardner,
Its actually not that difficult!

By creating a template over ride for mod_menu default.php and then modifying line 82:

// The next item is deeper.
if ($item->deeper) {
echo '<ul class="dropdown menu">';
}


to:

// The next item is deeper.
if ($item->deeper) {
echo '<ul class="sidebardropdownmenu">';
}


This now correctly displays the sub menus and removes the dropdown effect.

Lee
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
It is quite complicated as it will require customization. The style comes from Joomla 3 default. In Joomla 2.5, its working fine as I remember.

Regards.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Lee Tempest,

Like to see you again. There are 2 ways to do this.

Way 1:

1. Create style file (.less file) in the less folder that you want to load to the menu items you want (for example: blog.less)
2. Open the layout file that the menu items you want to load the css file and add the following code:

<head>
<?php $this->addCss('layouts/blog') ?>
</head>


Way 2:

1. Create style file (.less file) in the folder: templates\t3_bs3_blank\less\extras
2. Open any t3 bs3 blank template style, in the "Add-ons" tab, you will the section: Template Extended styles, you can assign the pages that will load the custom style from the .less file you created in step 1.

Regards.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 3
Accepted Answer Pending Moderation
0
Votes
Undo
Gardner Luna,
Thanks for the replies, I actually discovered another solution by accident. Each on of the templates uses a different template style, so there are three different files in my tpls folder, by simply adding the class to the body tag I have achieved the same solution!

Thanks for the advice. I'm now trying to solve the issue of the sidebar menus on my site to function without a drodpown, I just want them to display as a simple list once the initial parent page has been clicked and is being viewed. How can I achieve this?

Lee
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 4
Accepted Answer Pending Moderation
0
Votes
Undo
Oh, great exploration man.
Comment
There are no comments made yet.
  1. more than a month ago
  2. General Discussion
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.