Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Fuji Kusaka 2203 posts 4220 karma points
    Dec 18, 2012 @ 13:17
    Fuji Kusaka
    0

    How to get to render a razor code from dictionaryItem

    Hi Guys,

    I have 2 different textString property associated to everything image uploaded in the media section and depending on the culture i would like to display either the EN or DE content.

    The code that needs to be render is inside a DictionaryItem where it will be displayed inside the title tag. 

    The issue is instead of rendering the razor code instead it is only outputting title="@photos.legends"  instead of title="something" .

    dynamic Resorts = umbraco.library.GetDictionaryItem("Legends");    
    if(photos.Position() < 1){
    <a href="@photos.Url" rel="prettyPhoto[@folder.Name]" title="@Resorts"><span class="page-buttons gallery">@umbraco.library.GetDictionaryItem("Gallery")</span></a> }
    else{
    <a href="@photos.Url" rel="prettyPhoto[@folder.Name]"  title="@Resorts"></a>
    }
    }

    What am i doing wrong here ? or is there a better way of getting to do this ?

     

  • Fuji Kusaka 2203 posts 4220 karma points
    Dec 18, 2012 @ 22:05
    Fuji Kusaka
    0

    Any suggestion to this ??

    Is there a better way of doing this like for example checking the culture info of the current node  ?

     

     

Please Sign in or register to post replies

Write your reply to:

Draft