Share » Forums » Developer » how to use extract_left ?

how to use extract_left ?

how to use extract_left ?

Thursday 18 January 2007 8:47:55 am - 3 replies

Modified on Thursday 18 January 2007 8:48:37 am by kavi kavi

Author Message

Luc Chase

Thursday 18 January 2007 8:52:12 am

Did you try?
{attribute_view_gui attribute=$node.object.data_map.intro|extract_left(20)}

The Web Application Service Provider

Nabil Alimi

Thursday 18 January 2007 9:27:19 am

Hi,

This won't work since extract_left should be used on a string.

You need to apply this directly on the output of the content of your datatype.

{$node.data_map.intro.content|extract_left( 20 )}

This means this is incompatible with the attribute_view_gui operator.

My blog : http://www.starnab.com/ezpublish / http://www.starnab.com/ / http://www.assiki-consulting.com
eZ Publish Freelance developper. Feel free to contact me +33 674 367 057
nabil at assiki d0t fr

kavi kavi

Friday 19 January 2007 12:41:43 am

Hi Nabil !
thanks for your quick answer.
I've just tried your suggestion. But it doesn't work !!!
My code is in the override/templates/listitem/article.tpl

<li class="extraitNews">
<h1>
<a href={$node.url_alias|ezurl} title="Lien vers : {$node.object.data_map.title.content|wash}">{$node.object.data_map.title.content|wash}</a>
</h1>

<p>{attribute_view_gui attribute=$node.object.data_map.intro} </p>
</li>

If extract_left is incompatible with attribute_view_gui, do you think that i've to modify another template..?!
kavi

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

36 542 Users on board!

Forums menu