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

eZ debug

Timing: Jan 30 2025 22:28:07
Script start
Timing: Jan 30 2025 22:28:07
Module start 'content'
Timing: Jan 30 2025 22:28:07
Module end 'content'
Timing: Jan 30 2025 22:28:07
Script end

Main resources:

Total runtime0.3283 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0126 587.8047370.3125
Module start 'content' 0.01260.0162 958.11721,009.4453
Module end 'content' 0.02880.2994 1,967.56253,898.1484
Script end 0.3282  5,865.7109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00481.4728200.0002
Check MTime0.00130.4076200.0001
Mysql Total
Database connection0.00130.390210.0013
Mysqli_queries0.222767.83701410.0016
Looping result0.00140.41701390.0000
Template Total0.299091.110.2990
Template load0.00090.283310.0009
Template processing0.298090.780710.2980
Override
Cache load0.00050.166610.0005
Sytem overhead
Fetch class attribute can translate value0.00210.635710.0021
XML
Image XML parsing0.00030.095910.0003
General
dbfile0.00812.4549200.0004
String conversion0.00000.003130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs