Jump to:

3445 Posts in 1031 Topics by 872 members

Template Questions

SilverStripe Forums » Template Questions » Get multiple layouts to frontpage

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

Page: 1
Go to End
Author Topic: 648 Views
  • quanto
    Avatar
    Community Member
    81 Posts

    Get multiple layouts to frontpage Link to this post

    I'd like to get multiple pages to the frontpage. The Content, title et cetera is no problem. However, I can't include the attached Layout to it.

    Is there any way to get several layouts to e.g. Home.ss?

    Something like this:

    <% control Menu(2) %>
    <% include Layout.ss <-- doesn't work %>
    $Content
    $Form
    <% end_control %>

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Get multiple layouts to frontpage Link to this post

    If something is going to be included then it needs to be in the Includes directory and the include statement is written without the .ss. So if you put a Layout.ss in the Includes folder then you can include the file with <% include Layout %>. However I'm not sure if <% include %> works inside a control block, you'd have to test that first.

    What exactly are you trying to do?

  • quanto
    Avatar
    Community Member
    81 Posts

    Re: Get multiple layouts to frontpage Link to this post

    I found the solution in this forumpost. Thanks anyway for your help!

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