Forums / General / enum design view

enum design view

Author Message

Tim Dickinson

Saturday 18 October 2003 3:33:23 pm

I have a multiple choice enum option on a content class on my site. At the moment (by default in user design) the options selected show up with a </ br> between each one. eg:
Option1
Option2
Option3

How can I change this to a "/" so that all the options will show p on the same line. eg:
Option1/Option2/Option3

Thanks in advance,

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Paul Borgermans

Sunday 19 October 2003 2:42:34 am

Copy

design/standard/templates/content/datatype/view/enum.tpl

to (and create the directory structure or even copy the entire standard templates tree to your design)

design/<yourdesign>/templates/content/datatype/view/enum.tpl

and edit this file.

You can also use override templates, see the docs for more.

hth

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Tim Dickinson

Sunday 19 October 2003 4:08:28 am

Thanks very much Paul,

as always - a lot of help!

Cheers

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Tim Dickinson

Sunday 19 October 2003 4:40:38 am

Hi again Paul,

I have a bit of a problem with overriding for the enum datatype, as I would like to override by content class attribute rather than content class. I need to do this as in the conent class that I am designing a template for there is more than one instance of the enum datatype in that class (called download_review). Is there any way to do this?

Thanks again,

Tim

http://www.AdBalance.com - Ad network news and reviews
http://www.DevPublisher.com - Website publisher guides, tools and news
http://www.AudioMelody.com - Make better music

Paul Borgermans

Sunday 19 October 2003 4:46:20 am

That's not possible in the template override system, you will have to do this in the template itself by looking up the attribute and probably use the switch construct:

http://ez.no/developer/ez_publish_3/documentation/development/libraries/ez_template/functions/switch

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Paul Borgermans

Sunday 19 October 2003 4:59:57 am

Probably too fast and short answer: you will need to do it in the template of your new class. Create a basic template in the admin -> setup - > templates interface with a "view without children". This gives you all the attributes. Now you can copy the content from enum.tpl here and change the display as you want to.

If one attribute has influence to another, use the switch construct as hinted above.

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans