Jump to:

3439 Posts in 1028 Topics by 869 members

Template Questions

SilverStripe Forums » Template Questions » Shared content

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

Page: 1
Go to End
Author Topic: 916 Views
  • hhxbox
    Avatar
    Community Member
    2 Posts

    Shared content Link to this post

    I would like to have a.ss template for page 'a' and b.ss and c.ss for pages 'b' and 'c' that will use a.ss.
    So my page can be type 'a', 'b' or 'c', but 'b' and 'c' will just use 'a'.
    In the other words I am trying to create shared content on 'b' and 'c' pages and have page 'a' be child of multiple parents 'b' and 'c'.

    Is this best way to do it and what is the most efficient way to implement this anyway?
    My only requirement is that page type 'a' has to be independent so it does not belong to neither of those pages.

  • zenmonkey
    Avatar
    Community Member
    528 Posts

    Re: Shared content Link to this post

    Not exactly sure what you're getting at here. If this is a template issue and just display you can share layouts elements through includes.

    http://doc.silverstripe.org/doku.php?id=templates
    http://doc.silverstripe.org/doku.php?id=tutorial:2-extending-a-basic-site#creating_the_templates

    Or are you trying to share data between different page types. Are A B C different pagetypes as in each is its own unique class or are they just layout templates that get called depending on the parent page? Because you may be able to pull off what you want with a <% control Parent %> to pull data from the parent page

  • hhxbox
    Avatar
    Community Member
    2 Posts

    Re: Shared content Link to this post

    Thank you for your reply.
    I am new at this and I guess I got it all wrong.
    Basically I am trying to have multiple parents for one child,
    where child will supply parents with content but parents will have
    different background color, banner, side menu etc ..

    tx again

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