Maybe I overlooked something in the docs, but I can't for the life of me figure out how to go about creating a single reusable and editable content block which I can include on multiple pages.
Let's say I'd like a textblock visible in the "sidebar" throughout the website. The user should be able to change the content of the block, but this content should not be page-dependent but site-dependent.
to my knowledge, there's no readymade solution to this problem (yet).
maybe something for the widget-api?
we usually declare a container-page (or just use the home-page) with an editable property that can be queried from other pages - a bit hacky, but does the trick ;)
That makes sense I'm just not having much luck making it work. What I've done is added a new page type so the CMS has a page specifically for the sidebar content. I used the ArticlePage code from the tutorial to add the extra fields to the page. Although I've done this I'll need to change the type of field these are. I'm trying to do an "student of the month" sidebar. It would be nice to have a text box for the student's name, a box to choose the student's photo from the uploaded files, and a box for some content about the student. That way it's pretty dumb proof. I can get all this in the layout page but I'm just having trouble getting the layout page to be displayed in the template. Becasue of the variables if I use the code from the layout page it just mimics the content on each page giving me the same content twice. Hope this all makes sense.
1. add a field to the homepage, like SideBarContent
2. on all pages, fetch Homepages' SideBarContent field and put it into the template ... :)
Yes. That's what I need to do. I know how to use the includes but I can't seem to get the data from a custom page in the CMS to the includes folder so I can use an include in the template. Unless that's the wrong way to go about it. It needs to be something really easy for a non-web-savvy user to update. Thanks!