Datatype selection options values with multisite

Author Message

Alex Saintilan

Thursday 26 July 2007 1:26:45 am

Is there a way for a same class to have different options values depending on the site ?
I am using a class <i>document</i> with an attribute <i>theme</i> (datatype selection).
The theme needs to be different on each site.

I know i can do this by overriding template ezselection.tpl but ii would rather find a solution with configuration file.

Thank you in advance for any answers.

Kristof Coomans

Thursday 26 July 2007 3:00:28 am

Hi Alex, and welcome to the eZ community!

No, this is not possible. Maybe we can find an alternative solution for your problem, if you explain us a bit more what exactly you need to achieve?

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Alex Saintilan

Thursday 26 July 2007 8:47:11 am

I have several sites on an ezpublish instance.
I have one class <i>Document</i> with an attribute <i>theme</i> (datatype : selection).
Each site needs to have its own themes but they are declared once in the class.

Is there a way to override the options of a selection datatype attribute of a class ?
Or should I create a class per site only to change the options of an attribute ?

André R.

Thursday 26 July 2007 11:33:28 am

This is as previous said not best done with selection, you could solve it in several ways.

1. having the filed as a object relations with drop down and restrict the related themes each site can select with read rights. So you need to create a theme class, and place all the theme objects in a specific subtree.

2. use a ezstring filed and override the template to show a drop down box instead of string input. The values in the drop down can then be generated by some ini setting and what site the object is placed in. Downside is that the a specific selection will still be stored in the object even if you delete it from the ini file, so they need to re edit the objects if they use a option you need to remove.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Donat Fritschy

Friday 27 July 2007 9:32:05 am

Hi Alex

if you use multiple sites, you have different siteaccesses, dont't you? Do they need to share the same database? If not, there should be no problem. Or did I miss the point?

Regards
Donat

http://www.webmanufaktur.ch - Developers united in eZ Publish: http://www.cjw-network.com

Alex Saintilan

Tuesday 31 July 2007 1:02:45 am

Hi Donat,

All my sites need to share the same database.
After a few test, the André's first solution seems to be the good one.

Thanks for your answers.

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