kcuhcx2
kcuhcx2

Reputation: 353

Creating a page within a page in SilverStripe

I've just started using SilverStripe and I am wondering whether it is possible to have pages within pages. E.g. the top half of a page is called subpage1 which is editable within SilverStripe, and the bottom half of the page is split between three pages, subpage2, subpage3 and subpage4. And all of the pages can be editable within SilverStripe.

Upvotes: 0

Views: 47

Answers (1)

dougtesting.net
dougtesting.net

Reputation: 571

This should be possible, but a better solution might be to consider using the https://github.com/sheadawson/silverstripe-blocks module to have editable content areas on a page.

If you really wanted to do this with pages then you can loop though the children of a page in a template like so...

<% loop $Children %>
    <h2>$Title</h2>
    $Content
<% end_loop %>

In the CMS you will need to structure it so that a page has sub-pages underneath. I would consider using the content from the parent page at the the top with 3 child pages outputting content for the bottom 3 as that might make the temaplate syntax easier.

Upvotes: 1

Related Questions