Truncate String Options
dcrug
Posted: Thursday, May 08, 2008 6:43:45 PM
Rank: Newbie

Joined: 5/2/2008
Posts: 13
Location: NYC
I'm trying to truncate a string from an @alias, is there a way to use the function provided by umbraco to cut the string to specific length.

Like:

umbraco.library:TruncateString(@alias,100, '' )
drobar
Posted: Thursday, May 08, 2008 6:52:39 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,083
Location: KY, USA
Just do substring($myAliasVariable, 1, 100) to get the first 100 characters. No need for an umbraco library call in this case.

The w3schools site is a fantastic resource:
http://www.w3schools.com/Xpath/xpath_functions.asp

And so is Casey's excellent umbraco book:
http://www.umbraco.org/documentation/books/xslt-basics

cheers,
doug.

MVP 2007/2008 - Official Umbraco Trainer for North America - Percipient Studios
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.