Forums / Setup & design / eZ OE 5.0: Subtitle / Caption for Images

eZ OE 5.0: Subtitle / Caption for Images

Author Message

Michael Fürst

Tuesday 07 April 2009 12:59:30 am

Hi there, again me ;)

Another question to eZ OE 5.0 (maybe this is also important for other users):
Is there a way to add a Caption / Title / Subtitle for an Image when it's inserted? So that this caption is stored as $object attribute and can be accessed in the template.

<b>For example:</b>
Imagine you have an image of the Eiffel Tower in Paris in the eZ Media Library. The Editor adds this Image to the first Article "Nightlife in Paris" and wants to add the subtitle / caption "<i>The Eiffel Tower and his beautiful illumination at night</i>" wich is shown directly bellow the image in the article.

Some weeks later the Editor writes another article about resturants in Paris an uses the exactly same image of the Eiffel Tower from the eZ Media Library again. But now he wants to add the caption "<i>The great Tower Restaurant in the Eiffel Tower is a must</i>" bellow the image.

<b>Problem:</b>
The easiest solution would be to add an Attribute "Subtitle / Caption" to the image class and the editor has to add the caption when he adds the image to the Media Library. BUT: As we know from our editors, many images are used not only one time and in one article - for example they use very often symbolic images (like the tower image) for many articles. And in each article there should be another caption.

So the only way to solve this problem would be, that the editor adds the caption during the selection process in the eZ OE 5.0 - that's already possible when uploading a new image but not when choosing an existing image object from the media library.

<b>The question is:</b>
Has anyone an idea how to add an additional field "Subtitle / Caption" to the embedded image selection tool of eZ OE 5.0 so that this value is available as $object variable in the template? (like Offset or Limit)

Thanks & regards,
Michael

Michael Fürst

Wednesday 29 April 2009 6:37:42 am

Hi Guys,

Sorry, I've to push this topic up.
If noone knows a solution - how are you handling this problem? Maybe there is another way i don't see at the moment.

Regards,
Mike

André R.

Wednesday 29 April 2009 7:18:30 am

Use custom attributes, look in content.ini and optionally ezoe_attributes.ini to see how and what you can do.

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

eZ debug

Timing: Jan 18 2025 10:16:39
Script start
Timing: Jan 18 2025 10:16:39
Module start 'content'
Timing: Jan 18 2025 10:16:40
Module end 'content'
Timing: Jan 18 2025 10:16:40
Script end

Main resources:

Total runtime1.4351 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0056 588.9609180.8281
Module start 'content' 0.00561.2426 769.7891561.3828
Module end 'content' 1.24820.1869 1,331.1719336.7422
Script end 1.4351  1,667.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00430.2970210.0002
Check MTime0.00160.1143210.0001
Mysql Total
Database connection0.00060.041210.0006
Mysqli_queries1.353694.31511940.0070
Looping result0.00280.19591920.0000
Template Total1.401497.620.7007
Template load0.00220.155120.0011
Template processing1.399197.490320.6996
Template load and register function0.00010.008110.0001
states
state_id_array0.00280.193710.0028
state_identifier_array0.00250.175320.0013
Override
Cache load0.00180.1261270.0001
Sytem overhead
Fetch class attribute can translate value0.00130.090430.0004
Fetch class attribute name0.00130.089550.0003
XML
Image XML parsing0.00250.172130.0008
class_abstraction
Instantiating content class attribute0.00000.001060.0000
General
dbfile0.00730.5085340.0002
String conversion0.00000.000330.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
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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 25
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs