Using "attribute_view_gui" with the 'break' function

Using "attribute_view_gui" with the 'break' function

Friday 30 January 2004 7:48:19 am - 3 replies

Author Message

Cam McVey

Monday 02 February 2004 6:08:26 am

Nobody got any bright ideas? I'm really stuck here!

attribute_view_gui seems to only want an object, not a string, so there doesn't seem to be any way to pipe the value to the 'break' function and then have it be displayed.

Any help given would be really appreciated.

Balazs Halasy

Monday 02 February 2004 7:28:53 am

There are two ways of showing content:

1) Showing it using the attribute's view template
2) Showing it directly

You're doing number one. What happens there is that eZ publish inserts another template where you call the "attribute_view_gui" function. Instead, you could do something like this:

"$node.object.data_map.story_intro.content"

This will return the string that is stored in that attribute. Now, you could simply pipe that string into whatever operator you want. See? (PS: If story_intro is XML text then you would have to do append a ".content.output.output_text" to the attribute. If story_intro is only text/text-line then .content is enough.)

Cheers..

Balazs

Cam McVey

Monday 02 February 2004 7:53:21 am

Perfect! This did exactly what I wanted:

<p id="story_intro">{$node.object.data_map.story_intro.content | break}</p>

Thank you very much!

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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.