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

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:26:02
Script start
Timing: Jan 18 2025 16:26:02
Module start 'layout'
Timing: Jan 18 2025 16:26:02
Module start 'content'
Timing: Jan 18 2025 16:26:02
Module end 'content'
Timing: Jan 18 2025 16:26:02
Script end

Main resources:

Total runtime0.5838 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.7891152.6094
Module start 'layout' 0.00520.0037 740.398439.4063
Module start 'content' 0.00890.5734 779.8047578.9141
Module end 'content' 0.58230.0015 1,358.718816.1953
Script end 0.5838  1,374.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5823160.0002
Check MTime0.00140.2445160.0001
Mysql Total
Database connection0.00090.154510.0009
Mysqli_queries0.516588.4646660.0078
Looping result0.00050.0917640.0000
Template Total0.554495.020.2772
Template load0.00230.396120.0012
Template processing0.552194.555720.2760
Template load and register function0.00010.025510.0001
states
state_id_array0.00120.210310.0012
state_identifier_array0.00070.116020.0003
Override
Cache load0.00200.3399440.0000
Sytem overhead
Fetch class attribute can translate value0.00050.083820.0002
Fetch class attribute name0.00130.217480.0002
XML
Image XML parsing0.00110.183120.0005
class_abstraction
Instantiating content class attribute0.00000.0044120.0000
General
dbfile0.00090.1546230.0000
String conversion0.00000.001440.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
6content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs