Forums / Developer / How do apply an apply an operator attribute_view_gui attribute=$node.data_map.intro

How do apply an apply an operator attribute_view_gui attribute=$node.data_map.intro

Author Message

Romeo Antony

Wednesday 30 June 2010 12:06:49 am

to

{attribute_view_gui attribute=$node.data_map.intro|charactertrunc(94)}

Ivo Lukac

Wednesday 30 June 2010 2:14:56 am

You can't do that directly like that. Either:

- override datatype template

- or use datatype content directly: {$node.data_map.intro.content|charactertrunc(94)}

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Romeo Antony

Wednesday 30 June 2010 2:27:37 am

Thank you Ifor your reply.

when I use {$node.data_map.intro.content|charactertrunc(94)} I am getting message only as "Object"

What is it mean Ivo. Any idea?

Ivo Lukac

Wednesday 30 June 2010 6:18:41 am

Is intro attribute text line, text block or ezxml field?

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Romeo Antony

Wednesday 30 June 2010 6:36:31 am

ivo, it is [XML block]

Romeo Antony

Wednesday 30 June 2010 6:39:15 am

Do I need to change the type of identifier intro to text line, any suggestions Ivo..

Ivo Lukac

Thursday 01 July 2010 2:21:53 am

The problem with XML block is that its full of tags. So you can't shorten it directly. You should first strip tags and then shorten it. Or use Text block type if you don't need the markup (like bold, italic, etc).

So you first need to decide if you need markup or not...

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Romeo Antony

Thursday 01 July 2010 3:06:35 am

Thank you Ivo .I got you.I will strip the html tags or convert the intro type to text block .Since there is we do not need an xml data in the summary(intro) attribute.

Thank you very much Ivo. Romeo