Jump to:

3393 Posts in 976 Topics by 852 members

Template Questions

SilverStripe Forums » Template Questions » Templating hierarchy

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

Page: 1
Go to End
Author Topic: 554 Views
  • FrozenFire
    Avatar
    Community Member
    1 Post

    Templating hierarchy Link to this post

    I'm quite surprised that this hasn't yet been thoroughly addressed, as it's something that I ran into fairly quickly.

    My site structure looks something like this:

    Site ->

    • Home
    • Company ->
      • Vision
      • Team
      • ...
      • ...

    • Portfolio ->
      • ...
      • ...

    And so on. It's a three-level hierarchy. All of the subpages are very simple, and don't need their own controller logic. They're simply template content that wouldn't do well with being in the CMS.

    I would like to have these subpage templates in a subdirectory of Layout, and rendered automatically within their parent pagetype template. I cannot figure out how to extend the template selection of SiteTree to do this.

    Any ideas?

  • ampedup
    Avatar
    Community Member
    133 Posts

    Re: Templating hierarchy Link to this post

    Couldn't you just create the pages in the CMS and add the content in there?
    Wouldn't this be simpler than creating a different template for each?

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