Hello Stefan, 

When you are using {attribute_view_gui} or {node_view_gui} you can pass down 
variables using this method: 
Exemple for an image: 
{attribute_view_gui attribute=$node.data_map.image image_class=$image 
var1=$var1 parent_node=$parent_node} 

You will then have access to the variables $var1 or $parent_node in the 
template you are working in. 


The thing is that the idea behind ezflow is really to create one templates 
layout for all pages. If you pass down the parent_node_down then you will have 
one block calculated for each one of your pages, which will not really be 
optimal for your site, if you have a large amount of pages. 

There are many way to workaround this cache issue. One method is using 
javascript: 

1) caluclate your bloc in a template and the transfer it using javascript. 
<code> 

<div style='display:none;' id='dummy_test_bloc' > 
{attribute_view_gui} 
</div> 

</code> 

In your ezflow block : 

<code> 

<div id="block_in_ezflow"> 

</div> 
{literal} 
<script> 
$("#block_in_ezflow").html( $("#dummy_test_bloc").html() ) ; 
</script> 
{/literal} 

</code> 

Good luck, 
Paul 

----- Mensaje original -----
De: "Stefan Georg" <[email protected]> 
Para: "sdk-public" <[email protected]> 
Enviados: Jueves, 3 de Marzo 2011 5:02:34 
Asunto: [Sdk-public] how to get article's ID from embedded image object 

Hey, 

I'm using attribute_view_gui function to load an image. It finds the embed 
template file correctly. I was wondering if there was a way in that template 
file to find the object of the article which included it. I'm using ezflow, so 
I don't want {$#node} as that points to the parent page Home. I would want the 
article which included it. I can get it from the 
reverse_related_contentobject_array, but that could have multiple articles in 
it. Any other suggestions? Would be nice if the variables in the calling 
template were available as namespaced to something like 
$parent_template.variables... 

Stefan 
-- 
Sdk-public mailing list 
[email protected] 
http://lists.ez.no/mailman/listinfo/sdk-public 
-- 
Sdk-public mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/sdk-public

Reply via email to