Handling site settings?

Author Message

Deane Barker

Friday 15 October 2004 3:12:27 pm

What's the commonly accepted way for eZ publish to handle site settings? By this, I mean fairly static content. For instance:

-- In the footer, the company needs to have their address displayed. I don't want to hardcode this into the template, in case they want to change it. So, were do I...put it? Where should this content get stored?

-- If I make a standard site, it would be nice to let the user change the colors of the site from the admin interface. Just pick a color "scheme" from a drop down list.

Etc. These things are content, but not like news articles, etc. They're "behind the scenes" content.

I'm tempted to create a "Settings" object in the content root and just instantiate that by NodeID then read the attributes off it. It wouldhave attributes for "Footer Text" and "Color Scheme." To edit global site settings, the user could just edit that object and change what he/she wants to change. This object wouldn't be visible anywhere other than the admin side of the site.

Any thoughts from anyone else?

Deane

Lazaro Ferreira

Friday 15 October 2004 5:43:21 pm

Hi,

As you said you can perfectly use setup .ini settings to setup your site parameters, AFAIK this is the preferred way to do it

Normally you override ezp .ini files to put your custom settings , like you did in site.ini.append.php while setting up your siteaccess

From templates you can access your custom settings using

ezini(...)

operator take a look at

http://ez.no/ez_publish/documentation/reference/template_operators/data_extraction/ezini

i.e: if you take a look at ezp toolbar implementation, you will see it is implemented using .ini settings, you can also see how it is used in ezp standard pagelayout (EZP 3.4.+)

 

Lazaro
http://www.mzbusiness.com

Deane Barker

Friday 15 October 2004 7:25:07 pm

Can you control access permissions to INI files? I'd hate for the users to have access to ALL the settings in ALL the files. Is there any way to give them access to this one INI file only?

Deane

Deane Barker

Saturday 16 October 2004 2:24:59 pm

How about this --

I would like to create a entirely separate "tree" from the "content" tree (is it a "module"? Confused about the terminology). This way I can let my users create objects in this tree that I can use for site settings. For instance, a "Menus" folder could have "Menu" children which could have "Link" children, etc.

I have the eZ Publish book, and I think I could figure it out. But what am I'm talking about? A new module?

Deane

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.