Copied to clipboard

Flag this post as spam?

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


  • Janire 2 posts 25 karma points
    May 16, 2014 @ 12:33
    Janire
    2

    GetVortoValue("propertyName") returning null

    We have just installed the Vorto package successfully. We have the new Data Type inherining from Vorto Data Type.

    Now we are trying to get the Vorto property value with the function item.GetVortoValue("Alias") and the function is not returning anything. All the Vorto languages values are filled.

    If we debug and call to item.GetPropertyValue("Alias") we can see that it has the language values stored inside.

     

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 16, 2014 @ 14:02
    Matt Brailsford
    101

    Hi Janire,

    When calling item.GetPropertyValue("Alias") it uses the currently culture of the website to lookup which language value to return. This culture must match with one of the cultures in the vorto value. Have you checked what your current culture is and whether you have an entry for that culture?

    Many thanks

    Matt

  • Janire 2 posts 25 karma points
    May 21, 2014 @ 13:27
    Janire
    1

    Hello,

    Thanks for your reply!

    Finally its working. I was callig to the method from a dynamic var value, if I cast the object to IPublishedcontent first its working.

    IPublishedContent sitem= (IPublishedContent)item;

    sitem.GetPropertyValue("Alias");

    Janire.

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    May 21, 2014 @ 13:33
    Matt Brailsford
    0

    Ahh, great stuff, glad you got it working.

    I must admit, I haven't really done much testing from a dynamics perspective (the project description does point that out) so I guess that means it doesn't work :) I'll add it to my list though.

    Thanks for reporting it.

    Matt

  • alexant 22 posts 42 karma points
    Jun 12, 2014 @ 00:27
    alexant
    0

    Can I use "getVortoValue" on my tempate that inherits..

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage   ?

    smth like...    @CurrentPage.GetVortoValue("vortoText")

  • Matt Brailsford 4125 posts 22223 karma points MVP 9x c-trib
    Jun 18, 2014 @ 11:04
    Matt Brailsford
    1

    Hi,

    Yes you can, but you can't use the dynamic @CurrentPage.GetVortoValue("vortoText") you need to use the strongly types @Model.Content.GetVortoValue("vortoText").

    Matt

  • Mangirish Wagle 34 posts 106 karma points
    Aug 05, 2016 @ 11:37
    Mangirish Wagle
    0

    Thanks Matt.

    But I am facing an issue.

    I have used this directive @using Our.Umbraco.Vorto.Extensions

    and used this to get Vorto Property Value from RichText editor.

    @Model.Content.GetVortoValue("pageContent").ToString()

    but this returns as

    This is Home

    I don't need HTML tags here.

    Please suggest.

    Regards.

  • Mangirish Wagle 34 posts 106 karma points
    Aug 05, 2016 @ 11:48
    Mangirish Wagle
    0

    Hello Matt,

    After some fiddling around I got to this solution.

    @Html.Raw(@Model.Content.GetVortoValue("pageContent")) which solved my issue.

    But please suggest if there is another way around to this.

  • Mangirish Wagle 34 posts 106 karma points
    Aug 08, 2016 @ 09:03
    Mangirish Wagle
    0

    Hello All, I am now intending to get a Vorto Property value by a specific node id. eg. If I created a page "About us customisation" which has node id say 1174. and want to call it in About us page which has altogether diffrent node id. How I can achieve this?

Please Sign in or register to post replies

Write your reply to:

Draft