23493 Posts in 18996 Topics by 2878 members
|Go to End|
3 March 2010 at 3:48am
I was trying to develop one part of the code but with no luck of finding the best way to do it.
So, I have 4 pages (Home, About Us, Services, Contact Us). I want to be able to access same data on About Us, Services and Contact Us, but not in Home, while also accessing specific data to each page template.
Imagine this, theres' diffent data shown on each page, but it keeps same company message. I could easily do it right in the template, but I also need it to be editable in CMS. Any ideas how can I do it?
3 March 2010 at 9:38am
Yea +1 what Mo said - thats what the SiteConfig panel in 2.4 was developed for. Trying to find a link on the wiki for it but doesn't look like its been documented yet.
In 2.3 what I normally do for global data is make a field on the homepage page type then in the template use <% control Page(home) %>$GlobalMessage<% end_control %>. Reason I do it on the homepage is usually there a) is one and b) its singlar so 1 place to edit the data. Not perfect so hence why SiteConfig is here in 2.4!
3 March 2010 at 1:34pm
All the stuff I know about SiteConfig I found out by reading inline docs and forum posts... I didn't know any other 2.4 docs existed .
Also, I pretty much do the same in 2.3. I usually have a HomePage class that expands Page, I tend to use pretty much the same code in my template as Willr.
|Go to Top|