5539 Posts in 1738 Topics by 1224 members
|Go to End|
8 January 2009 at 4:14pm Last edited: 8 January 2009 4:16pm
Hi there again,
In many sites, there's content that is sort of static, but sometimes needs to be updated. You know, things like headers above lists of links that are the same on every page, footers, etc. I can use includes to make them editable in one place, but that would not really be easily accessible to a site author (the user of the CMS I mean). I'm looking to find a way to make these things appear in the CMS. I was thinking of setting up "secret" pages to manage these things, or perhaps use a dataobject and a many_many relationship, just with one long row of name-value pairs, but for things that perhaps change a few times a year, it seems overkill to use control blocks (and hence more db calls every time) on every page just to show almost static information. Any thoughts?
9 January 2009 at 1:08am
I usually add a new tab in the UI for the homepage and stick all the configurable stuff under there.
9 January 2009 at 3:47am
This is a really interesting point. I think the only way you could really do it is to make those values properties of the home page, and when you want to get that nav header, for instance, you could just do a singleton('HomePage')-NavHeader call.
If you want different values on every page, then I think a tablefield is the way to go. A type dropdown in one column and a value in the other e.g. Contact-Us || NavHeader here
The most logical answer is to use static vars, of course, but your authors don't have access to PHP.
12 January 2009 at 2:05pm Last edited: 12 January 2009 2:06pm
Yeah, I was thinking about the home page option too. The table option is of course useable for different headers on every page, but I want the same... Btw, as a related subject, the headers I'm talking about are headers for list of links in the footer (you see this often nowadays in sites). The links themselves are also the same on every page, and I do that with something loosely based on this:
(I thought maybe that helps someone.)
Thanks for your thoughts!
|Go to Top|