Katharina

Tabs with an individual class

8 posts in this topic

Hello,

first of all i must thank you for this great extension, it's perfect to work with.

I just have a question: I want to implement an class style to only one of my tabs, so that for examble two tabs are green and one tab is blue:

<ul class="tab-container" >

<li style="width:auto;" class="prev"><span class="bt-li">Headline 01</span></li>

<li style="width:auto;" class="active before_blue "><span class="bt-li">Headline 02</span></li>

<li style="width:auto;" class="blue"><span class="bt-li">Headline 03</span></li>

</ul>

Do you have an idea how I can do this?

Best Regards

Share this post


Link to post
Share on other sites

Hi Katharina

I just try to implement this feature on BT Tabs

My change is

1. File /mod_btquickcontact/admin/formfields/bttabs.php

I add new field for Create Tab Form. This is tab-class.

You can see in my file from line 180th to 183th

2. File /mod_btquickcontact/admin/assets/js/bttabs.js

I change javascript to get and save new field for tabs. You can use text compare tool to see different because i change many lines :D

3. File /mod_btquickcontact/tmpl/themes/default/default.php

I add class to tab button and tab content (items) by this


<?php if(isset($tab->tabClass)) echo $tab->tabClass?>

<?php if(isset($tab->tabClass)) echo 'tab-items-' . $tab->tabClass?>

If you use accordion.php

You can refer default layout to edit it.

I hope it work correctly.

Good luck.

tabs.zip

Share this post


Link to post
Share on other sites

Wow, thank you for this quick support!

Now i can see the extra field in the backend for the tab class, but unfortunately the class I wrote in is not existing in the frontend.

I have cleared the cache, so it will not load any old file.

It just looks as if the system does not transfer the changes in the backend to the frontend.

Best regards

Share this post


Link to post
Share on other sites

Hi.

If you also change two file or apply the change to your current layout of BT TAbs.

I suspect that you have alternate layout in your template

Please check the folder /templates/your_template/html/mod_bt_tabs.

Share this post


Link to post
Share on other sites

Hurray,

after change the files in the module mod_tabs, mod_quickcontact and in my template/html (like you said) everything works fine!

Thank you for your prompt and successful help :D :D

Share this post


Link to post
Share on other sites