How to automatically insert a unique content block in pages of a specific page type, while keeping it editable?

Permalink
Hi everybody,

How to automatically insert the same content block into the sidebar on every page created of specific page type (ex: blog post), but keeps it editable for the client?

So, let's say I need to automatically insert the "Links" list in the sidebar for all blog's pages. The list is identical for all the blog's pages, but should be editable in one place ideally.

I would like to hear some advice on recommended ways to deal with such situation.

Thanks!

youngpixel
 
JohntheFish replied on at Permalink Best Answer Reply
JohntheFish
There are several approaches, which suits depends on the details of your requirement.

- Edit your theme to make the sidebar a global area (instead of a regular area). Probably best done by overriding the theme and creating a new page type.

- Use page defaults (via dashboard) to set default content for your page type's sidebar.

- Create a stack with the content that would be common, and insert that into each sidebar (or use page defaults to insert it by default)

- Setup the links on one page, then show the content on sidebars using a global areas block (an addon not the same as a theme global area), possibly also combined with page defaults.

- Setup the links on a parent page, then use a parent area block (an addon) to show them on descendant pages, possibly also combined with page defaults.
youngpixel replied on at Permalink Reply
youngpixel
Thanks a lot John! This was helpful. Was thinking about new page type too. But the easiest it turned out to be setting global areas.
JohntheFish replied on at Permalink Reply
JohntheFish
I left out the hard code option, probably not what you want, but for completeness nicely explained by Joradnlev in this thread:

http://www.concrete5.org/community/forums/customizing_c5/what-is-a-...