Developer forum

Forum » Templates » Is it possible to limit stringlength on Item tag?

Is it possible to limit stringlength on Item tag?

Hans Ravnsfjall
Reply

I am creating a newslist, and would like to show only the first 150 chars of a string coming from a tag. The item tag is

    <!--@ItemPublisher:Item.Innihald.Value-->

And i would hope to be able to do something like this

    <!--@ItemPublisher:Item.Innihald.Value.Limit(150)--> or     <!--@ItemPublisher:Item.Innihald.Value.Length{150}-->

this has to be possible, yes?


Replies

 
Hans Ravnsfjall
Reply
This post has been marked as an answer

Figured it out

the tag should be like this if anyone else needs it

<!--@ItemPublisher:Item.Innihald.Value.Remove(150)-->

 

 

Votes for this answer: 1
 
Mikkel Ricky
Reply

All tag extensions are documented in the documentation: http://templates.dynamicweb-cms.com/TemplateTags/Dynamicweb-template-tags/General-tags/Tag-extensions.aspx

Best regards,
Mikkel

 

You must be logged in to post in the forum