17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 4945 Views |
-
How to create a generic (editable) content block

25 August 2007 at 2:25am
Hi,
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.
I hope my explanation is clear.
Thanks in advance !
-
Re: How to create a generic (editable) content block

25 August 2007 at 6:15am
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 ;) -
Re: How to create a generic (editable) content block

31 August 2007 at 10:15pm
Thanks for your reply. We took the route you proposed.
-
Re: How to create a generic (editable) content block

8 November 2007 at 9:55am
Can you please do a run through of how you accomplished this? I need to do the same thing and have been trying to adapt ArticlePage piece of the tutorials without success.
-
Re: How to create a generic (editable) content block

8 November 2007 at 11:03am
Do you mean you're asking how to do this:
1. add a field to the homepage, like SideBarContent
2. on all pages, fetch Homepages' SideBarContent field and put it into the template ...
?
-
Re: How to create a generic (editable) content block

9 November 2007 at 3:50am
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.
-
Re: How to create a generic (editable) content block

12 November 2007 at 12:33pm
Do you mean you're asking how to do this:
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!
-
Re: How to create a generic (editable) content block

14 November 2007 at 6:11am
I really need some help on this if anybody has time to help me.
Thanks!
| 4945 Views | ||
| Go to Top | Next > |




