Jump to:

5537 Posts in 1737 Topics by 1223 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: 1221 Views
  • le_banana
    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>

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

    <div id="other">
    the content of the other tab
    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.

  • le_banana
    Community Member
    21 Posts

    Re: tabstrip problem - inactive tabs Link to this post

    My problem was solved .

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

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.