Jump to:

5450 Posts in 1672 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » tabstrip problem - inactive tabs

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1172 Views
  • le_banana
    Avatar
    Community Member
    21 Posts

    tabstrip problem - inactive tabs Link to this post

    Hello Everybody.
    I've got a little problem with tabstrip in cms, in my new module (which is php file, based of already generated CMS's code). I know, that i need something like that:

    <ul class="tabstrip">
    <li><a href="customising-the-cms/newModule.php#something">something</a></li>
    <li><a href="customising-the-cms/newModule.php#other">other</a></li>
    </ul>

    <div id="something">
    the content of 1 tab
    </div>

    <div id="other">
    the content of the other tab
    </div>
    I observed in firebug, how styles are changing , i mean:
    in <ul> with class "tabstrip" , the active <li> have class: current
    Active <div> have also class: current, and and other parametr is: style="display: block;"
    Inactive <div> have style="display: none;"
    My problem is, when I open my new module in CMS, both of my tabs are inactive. I tried to set stiff parameters for one tab, like class="tab current" and style="display: block;" , but when whole page is loaded, only <li> is still active, but both of tabs are not (styles are again set to "display: none;" )
    Is there any possibility to run some kind of function from tabstrip.js file, or any other at the end of my code, to avoid this situation?
    Maybe exists other way to ensure, when user open this module, one of tab will be active?

    Eventually, i could use an anchor in the URL address, but for me it doesn't look professionally ;-)

    If somebody could help me, i would be greatfull.
    Peace.

  • le_banana
    Avatar
    Community Member
    21 Posts

    Re: tabstrip problem - inactive tabs Link to this post

    My problem was solved .

    There was "/" between "newModule.php" and "#something"

    1172 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.