Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Removing Sub-Menu on one page

Discuss SilverStripe Themes.

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

Page: 1
Go to End
Author Topic: 1394 Views
  • Custmguru
    Avatar
    Community Member
    3 Posts

    Removing Sub-Menu on one page Link to this post

    Ok, I'm brand new to this CMS and I'm struggling a bit on one thing. I am using the Terra-Firma theme for now on a site I'm building until I can spend the time building a new theme. Everything works fine, until I installed the event_calendar module. Technically, everything works fine, but the theme is a little too narrow for all of the panels to fit and the calendar box overlaps the SecondaryContent panel.

    My question is how can I either stop the submenu from displaying on that one page OR move the 'calendar_sidemenu' into the secondary content box. Ive tried a few things, but none of it has worked.

    Attached Files
  • _Vince
    Avatar
    Community Member
    156 Posts

    Re: Removing Sub-Menu on one page Link to this post

    The template allows you to do very primitive conditional processing, such as if-then-else. But no checking of variables except for booleans.

    One thing you could do would be to create a one line function in Page.php that returns true or false depending on the page type, page title or whatever you think is safe to check. Call the function something mnemonic like DisplayCalendarOnThisPage.

    Then you add something like

    <% if DisplayCalendarOnThisPage %>
    <div id="BlahBlahBlah">
    display calendar stuff
    </div>
    <% end_if %>

    to the template

    If the template doesn't see your function, you might need to change it to
    <% if top.DisplayCalendarOnThisPage %>

    That's ONE way to do it, I'm sure there's a heap of others. :o)

  • Custmguru
    Avatar
    Community Member
    3 Posts

    Re: Removing Sub-Menu on one page Link to this post

    Heres another possible fix. This page is for a school, so I wouldn't need to display the weekend days. That would wedge it into the space that it's in so it fits.

    Now, how could I keep the widget from displaying all 7 days?

  • Custmguru
    Avatar
    Community Member
    3 Posts

    Re: Removing Sub-Menu on one page Link to this post

    OK, I figured out an organizational way to resolve it. I flip-flopped the calendar and the filter form which pushed the overlap lower than it was before. Then I changed all of my dates that aren't re-occuring to announcements so they don't have thier own page for the links. It's not a great fix, but it's good for now.

    1394 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.