Jump to:

3444 Posts in 1030 Topics by 871 members

Template Questions

SilverStripe Forums » Template Questions » Same content on multiple pages?

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

Page: 1
Go to End
Author Topic: 641 Views
  • Romeo
    Avatar
    Community Member
    67 Posts

    Same content on multiple pages? Link to this post

    Just coming back to Silverstripe after a time away so I've probably forgotten how to do a bunch of things, and am hoping someone can jog my memory. I have a situation where I have some content which needs to be editable by a site administrator (information about a conference), and which must appear on a number of pages. I can see how I can have 2 CMS editable content areas on each page, but that's not really what I'm after - I want each page to have a single CMS editable content area, plus another content area which is editable in a single place elsewhere, but displayed on the other pages. What's the neatest way of going about this?

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Same content on multiple pages? Link to this post

    Put it on the SiteConfig.

  • Romeo
    Avatar
    Community Member
    67 Posts

    Re: Same content on multiple pages? Link to this post

    Thanks for the suggestion. I'll look into SiteConfig. It's not something I'm familiar with - the site was developed in Silverstripe 2.3.2, before the advent of SiteConfig. I've done the upgrade to the latest version, though, so it should be available to me.

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Same content on multiple pages? Link to this post

    It's a normal DataObject so just add fields to it with a decorator. It's accessible in the CMS by pressing the globe on the top of the SiteTree list.

  • Romeo
    Avatar
    Community Member
    67 Posts

    Re: Same content on multiple pages? Link to this post

    Having had a brief glance at it, it seems to be to do with one set of information which is relevant for the site as a whole, which wouldn't quite work for my situation. What I'm dealing with is information to do with conferences. Each conference has a number of related subpages, each of which has to display on one side the same content from the parent page .... er, I think I've just realised the obvious solution, simply by describing things here. I have a hidden conference page, with a CMS editable content area, and a number of child pages, each of which shows this parent content field as well as its own specific content field. That would work, wouldn't it? Blindingly obvious, really!

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: Same content on multiple pages? Link to this post

    Yes it would. I read your first question as being something that could potentially be global and used anywhere but for your situation putting it on the parent page seems like the best solution.

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