Jump to:

22976 Posts in 11702 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Organising Theme/Includes folder with subfolders...

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 1165 Views
  • theGermaniac
    Avatar
    Community Member
    82 Posts

    Organising Theme/Includes folder with subfolders... Link to this post

    Hey there,

    can I organise the theme folder Inlcudes using subfolders? So that I can use something like

    <% include myNewFolder/myIncludeFile %>

    Thanks in advance.

    Cheers, Mario

  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: Organising Theme/Includes folder with subfolders... Link to this post

    I don't suppose you can. You need to place templates in the root of the Layout and the Includes folders for them to be accessible from your template using $Layout or <% include xxxx %>. I tested this again just to be very sure and a simple ?flush=1 made parts of my site disappear

    For any other template you might use (from your code using renderWith() or populateTemplate() ) you seem to be free to use other foldernames, though I've never tested this with nested structures.

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