Bilder

Aus eZ Wiki

Wechseln zu: Navigation, Suche

Inhaltsverzeichnis

attribute_view_gui

Beispiel 1

[template]
{def $currentNode = fetch('content','node', hash('node_id', $module_result.content_info.node_id))}
{attribute_view_gui attribute=$currentNode.data_map.test_image image_class='large'}
[html output]
<img src="/var/aerzen/storage/images/generation-5/home/19823-45-ger-DE/Home_large.jpg" width="300" height="81"  style="border: 0px;" alt="" title="" />

Beispiel 2

[template]
{def $currentNode = fetch('content','node', hash('node_id', $module_result.content_info.node_id))}
<img src="/{$currentNode.data_map.test_image.content.large.url}" />
[html output] 
<img src="/var/aerzen/storage/images/generation-5/home/19823-45-ger-DE/Home_large.jpg" />


Objekt Relation

Beispiel 1

[template]
{attribute_view_gui attribute=$currentNode.data_map.section_image.content.current.contentobject.main_node.data_map.image  image_class='large'}
oder auch so
{def $imageNode = $currentNode.data_map.section_image.content.current.contentobject.main_node}
{attribute_view_gui attribute=$imageNode.data_map.image  image_class='large'}


[html output]
<img src="/var/aerzen/storage/images/media/resources_generation5/bereichsgrafiken/test/19675-1-ger-DE/Test_large.jpg" width="300" height="81"  style="border: 0px;" alt="" title="" />


ex4

URL des Bildes

<img src="{$node.object.data_map.my_image.content[image_size].full_path}" ... />

oder auch

<img src="{$node.object.data_map.my_image.content.image_size.url}" ... />


URL bei Objekt Relation

{$node.data_map.image1.content.current.contentobject.main_node.data_map.image.content[original].full_path}

Objekt Relationen

Ggf. gibt es auch ein weniger umständliche Lösung. Im Beispiel fehlt noch die Prüfung ob die Relation tatsächlich ein Bild referenziert. Das wäre für den Praxiseinsatz noch zu ergänzen.

{def
	$imageNode = 0 
    $relation_list = $valid_nodes[0].data_map.image_relation.content.relation_list
}
{foreach $relation_list as $relation}
	{set $imageNode = fetch( 'content', 'node', hash( 'node_id', $relation.contentobject_id ) )}
	{attribute_view_gui attribute=$imageNode.data_map.image  image_class='medium'}
{/foreach}


Design Verzeichnis

ex5

Bild im Design-Verzeichnis referenzieren.

<img src={"images/bzv/path_sep.gif"|ezdesign} />



Weblinks


Persönliche Werkzeuge
http://ez.no