How to Mirror Content?
Permalink
I am trying to figure out how to implement a calendar - a list of important dates - on our website. The requirements for this "calendar" are very slim: it is simply a text list:
Sep 28: Soccer Tournament
Oct 17: IDP Registration
Oct 23: IDP Placement Test
... and so on.
My question is: how can I mirror this content on various pages of my website (in my case the "home" and "events" pages.)
I would like for the content administrators to only have to change it in one of the instances (say "events" page) and the content is updated in other parts of the website automatically. Is that possible?
Michael
Sep 28: Soccer Tournament
Oct 17: IDP Registration
Oct 23: IDP Placement Test
... and so on.
My question is: how can I mirror this content on various pages of my website (in my case the "home" and "events" pages.)
I would like for the content administrators to only have to change it in one of the instances (say "events" page) and the content is updated in other parts of the website automatically. Is that possible?
Michael
I believe you edit the defaults for the page type. You may need to create a block first, which can later be added as the default for a page. Then each page you base from the page type will have the calendar.
Dashboard -> Page Types -> Defaults
What I'm not sure about is how to apply the calendar to all pages which are already based on that page type. Seems to work on a go-forward bases, but not retroactively. Its likely possible, I just don't see how to do it. I'm looking for the "Apply/Add to existing pages of this type"
Dashboard -> Page Types -> Defaults
What I'm not sure about is how to apply the calendar to all pages which are already based on that page type. Seems to work on a go-forward bases, but not retroactively. Its likely possible, I just don't see how to do it. I'm looking for the "Apply/Add to existing pages of this type"
This does work well, didn't get that far into the cms.
I believe when the page is saved as a child of that page type it is adding the blocks that are currently in the page type their blockID and their positions. I think this is a feature request, and a pretty good one.
I believe when the page is saved as a child of that page type it is adding the blocks that are currently in the page type their blockID and their positions. I think this is a feature request, and a pretty good one.
The same place in "defaults" where you add the new block...once you've added it, click on the block as it appears, and you should see a special option you only see while working on the defaults page... "Setup on Child Pages"
This should show all pages of this type, along with check boxes that will allow you to alias out the new block to existing pages...
This should show all pages of this type, along with check boxes that will allow you to alias out the new block to existing pages...
Thanks for your replies, everyone.
The editing of a "Page Type" to update the calendar would definitely do the trick.
I've tried out the process of making an update that way, and although it works, it is a little complicated for people who manage the content: enter dashboard > pick the right template > update calendar block content > remember to set up on child pages before saving. Also, I would like to have the calendar content appear in a narrow column on the "Home" page, but give it more horizontal space and different formatting on the "Calendar" page.
I was thinking that since the "content block's" content (on the calendar page) is written into the database, it would be possible to hardcode a statement (on the home page) to pull its content in (and wrap it in CSS tags so that it gives me flexibility in formatting it.)
That way, the content administrators of our website wouldn't need to worry or learn about our templating system and the content can be formatted/styled in various ways on different pages.
Is there such a code that would pull out content from an existing "content block"?
The editing of a "Page Type" to update the calendar would definitely do the trick.
I've tried out the process of making an update that way, and although it works, it is a little complicated for people who manage the content: enter dashboard > pick the right template > update calendar block content > remember to set up on child pages before saving. Also, I would like to have the calendar content appear in a narrow column on the "Home" page, but give it more horizontal space and different formatting on the "Calendar" page.
I was thinking that since the "content block's" content (on the calendar page) is written into the database, it would be possible to hardcode a statement (on the home page) to pull its content in (and wrap it in CSS tags so that it gives me flexibility in formatting it.)
That way, the content administrators of our website wouldn't need to worry or learn about our templating system and the content can be formatted/styled in various ways on different pages.
Is there such a code that would pull out content from an existing "content block"?
In C5 we currently have content blocks that are:
- one-offs: used on one page
- exact replicas: used on several pages when built into a "page type"
Now, my PHP skills are pretty basic and I would appreciate any pointers: how does one go about reading out contents from the database using PHP code (and C5's classes)?
The PHP code will then be used on page types. The way I see it, that kind of a setup has two benefits:
1. makes it possible to use in various parts of the website while enabling me to format the (same) content in different ways if necessary, and
2. is easy and intuitive for site contributors to edit (just like your standard content block).
- one-offs: used on one page
- exact replicas: used on several pages when built into a "page type"
Now, my PHP skills are pretty basic and I would appreciate any pointers: how does one go about reading out contents from the database using PHP code (and C5's classes)?
The PHP code will then be used on page types. The way I see it, that kind of a setup has two benefits:
1. makes it possible to use in various parts of the website while enabling me to format the (same) content in different ways if necessary, and
2. is easy and intuitive for site contributors to edit (just like your standard content block).
What about this:
http://www.concrete5.org/community/forums/customizing_c5/one_single...
Would my idea be useful for you?
http://www.concrete5.org/community/forums/customizing_c5/one_single...
Would my idea be useful for you?
Most definitely.
I have, in fact, set an alert for that thread some time ago, so what has been discussed there that is exactly what I've been looking for.
Thanks Remo
I have, in fact, set an alert for that thread some time ago, so what has been discussed there that is exactly what I've been looking for.
Thanks Remo
Just tried this, worked great.
Thank you Andrew.
Thank you Andrew.
But HOW? Explain please.
perfect - figured it was tucked in there somewhere.
I guess with the correct controller and edit page one could select a row that is already in the db table and use that, but I will let others hopefully answer this better than I can :)