Jump to:

3439 Posts in 1028 Topics by 869 members

Template Questions

SilverStripe Forums » Template Questions » Issues with subtemplate

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

Page: 1
Go to End
Author Topic: 484 Views
  • fireballmatt
    Community Member
    2 Posts

    Issues with subtemplate Link to this post

    I'm following the first tutorial, just trying to get familiar with how SilverStripe does things.

    I've created the Layout directory, modified Page.ss to point to it with $Layout in the proper place.

    the HomePage.ss within the Layout directory seems to work just fine, everything is included.

    The Page.ss within the Layout directory however only appears to display the HTML and $Content.

    If I try to add as something as simple as:

    <% if Level(2) %>
    this is a test!
    <% end_if %>

    It will display the HTML and whatever is in $Content, but nothing from within that if block when I attempt to browse to a page using the Page.ss template.

  • martimiz
    Forum Moderator
    1078 Posts

    Re: Issues with subtemplate Link to this post


    A bit of a late reply, but still:

    - Did you do a ?flush=1 after adding the new Page.ss template to activate it?
    - Also I suppose the page you're browsing is part of a section consisting of at least a rootpage with some childpages?

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.