Share » Forums » Developer » how to add more tag in...

how to add more tag in attribute_view_gui for image?

how to add more tag in attribute_view_gui for image?

Thursday 05 March 2009 11:49:26 am - 2 replies

Author Message

Jean-Yves Zinsou

Thursday 05 March 2009 12:08:43 pm

Hi there,
take a look at :
design/standard/templates/content/datatype/view/ezimage.tpl

you will understand how it works and the parameters that are used.

if you call

{attribute_view_gui attribute=$node.object.data_map.myimage image_class='large'}

image_class is used in the ezimage.tpl to define the size of the image to use.
Other parameters :

- image_class - Which image alias to show, default is large
- css_class - Optional css class to wrap around the <img> tag, the class will be placed in a <div> tag.
- alignment - How to align the image, use 'left', 'right' or false().
- link_to_image - boolean, if true the url_alias will be fetched and used as link.
- href - Optional string, if set it will create a <a> tag around the image with href as the link.
- border_size - Size of border around image, default is 0

feel free to add your own :

{attribute_view_gui attribute=$node.object.data_map.myimage image_class='large' my_new_attribute='blabla'}

then override properly the ezimage.tpl and you can use you new attribute in it like :

my new attribute is {$my_new_attribute }

quick and dirty way : modify directly the design/standard/templates/content/datatype/view/ezimage.tpl

Hope this helps !

Jey

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

Yannick Komotir

Friday 06 March 2009 12:55:19 am

Hi,

However you can use Nabil's extension http://ez.no/developer/contribs/applications/ezlightbox

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu