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.
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?
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.
Yes you can, but you can't use the dynamic @CurrentPage.GetVortoValue("vortoText") you need to use the strongly types @Model.Content.GetVortoValue("vortoText").
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?
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.
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
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.
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
Can I use "getVortoValue" on my tempate that inherits..
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage ?
smth like... @CurrentPage.GetVortoValue("vortoText")
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
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.
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.
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?
is working on a reply...