using Dictionary Item in xslt (or how to pass its translation to xslt script) Options
maciej
Posted: Tuesday, March 04, 2008 6:53:43 PM
Rank: Newbie

Joined: 3/4/2008
Posts: 3
Hi,

I started using Umbraco last week, so forgive me if my question is trivial, but I cannot find answer. :blush:

I'd like to use Dictionary Item from within XSLT, but I can't find out how.
I thought of a workaround, that is passing Dictionary Items translation as a macro parameter:

Code:

<?UMBRACO_MACRO macroAlias="TopNavi" pageHome="#pageHome"></?UMBRACO_MACRO>


(pageHome is dictionary item with several translations)
but what I receive in xslt is literally '#pageHome' and not the dictionary item's current language translation. :ermm:

Any hint would be greatly appreciated. :cry:

Maciej

http://www.similaconsulting.se
michael
Posted: Wednesday, March 05, 2008 3:25:19 PM
Rank: Enthusiast

Joined: 7/20/2006
Posts: 23
Location: Switzerland
Hi Maciej,

Try using the umbraco function

Code:

<xsl:value-of select="umbraco.library:GetDictionaryItem('name of dictionary item')"/>



There are lots of extra functions you can use in xslt. In the XSLT editor, click on the "Insert value of" icon at the top (next to the Save button).
Then click on "get extensions"

here you will find lots of magical xslt spells to play with

have fun!
Michael
maciej
Posted: Wednesday, March 05, 2008 4:24:18 PM
Rank: Newbie

Joined: 3/4/2008
Posts: 3
That was just it, thanks for excellent hint!! :!:

The 'Get extension' button you mentioned reveals huge potential! :)

Maciej
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.