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.

eZ debug

Timing: Jan 18 2025 16:33:06
Script start
Timing: Jan 18 2025 16:33:06
Module start 'layout'
Timing: Jan 18 2025 16:33:06
Module start 'content'
Timing: Jan 18 2025 16:33:07
Module end 'content'
Timing: Jan 18 2025 16:33:07
Script end

Main resources:

Total runtime0.9119 sec
Peak memory usage4,096.0000 KB
Database Queries60

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.8047152.6094
Module start 'layout' 0.00510.0039 740.414139.4141
Module start 'content' 0.00900.9016 779.8281546.3125
Module end 'content' 0.91060.0011 1,326.140612.5000
Script end 0.9117  1,338.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3518160.0002
Check MTime0.00140.1522160.0001
Mysql Total
Database connection0.00080.083010.0008
Mysqli_queries0.858494.1315600.0143
Looping result0.00060.0681580.0000
Template Total0.877396.220.4387
Template load0.00180.192020.0009
Template processing0.875596.015820.4378
Template load and register function0.00010.011010.0001
states
state_id_array0.00160.171610.0016
state_identifier_array0.00120.132520.0006
Override
Cache load0.00150.1651310.0000
Sytem overhead
Fetch class attribute can translate value0.00050.054820.0002
Fetch class attribute name0.00090.103350.0002
XML
Image XML parsing0.00050.060120.0003
class_abstraction
Instantiating content class attribute0.00000.001670.0000
General
dbfile0.00070.0749160.0000
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs