I'm using Vorto to create a bilingual site. All is brilliant so far but I have one small problem.
I'm using the navigation code snippet from the partial views area which displays the page name as the navigation links. However, this means that the page names are not translated. So I have two questions:
1) is there a away Vorto can be used on the page name
or
2) if I add a (Vorto) property called "menuTitle" to each page, how would I call that in the navigation loop?
Sorry Dave, I get a NullReferenceExcpetion on that
@item.GetVortoValue<string>("menuTitle")
and a ' 'Umbraco.Core.Models.IPublishedContent' has no applicable method named 'IsAncestorOrSelf' but appears to have an extension method by that name.' error before that on
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1973: 'Umbraco.Core.Models.IPublishedContent' has no applicable method named 'IsAncestorOrSelf' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
Vorto and navigation menus
Hi guys
I'm using Vorto to create a bilingual site. All is brilliant so far but I have one small problem.
I'm using the navigation code snippet from the partial views area which displays the page name as the navigation links. However, this means that the page names are not translated. So I have two questions:
1) is there a away Vorto can be used on the page name
or
2) if I add a (Vorto) property called "menuTitle" to each page, how would I call that in the navigation loop?
Thanks David Umbraco 7.2.8
Hi David,
I think the only option is number 2.
In your navigation loop you can do
Dave
Thanks, but that code doesn't quite work for me it just displays ("MENUTITLE") as the link name
Maybe you need change this line :
into
Strange that i see your code in the e-mail notification i got and not in this post.
Dave
Sorry Dave, I get a NullReferenceExcpetion on that
and a ' 'Umbraco.Core.Models.IPublishedContent' has no applicable method named 'IsAncestorOrSelf' but appears to have an extension method by that name.' error before that on
It must be possible otherwise no Vorto site would be truly multilingual if nav and breadcrumbs only show page Name
Thanks for your help. David
Can you post your entire code.
It will be easier to see where it goes wrong.
Dave
I can't get it to show in th editor, here is an image that hopefully will work.
Does it out put anything when you do
Dave
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1973: 'Umbraco.Core.Models.IPublishedContent' has no applicable method named 'IsAncestorOrSelf' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax.
Change that to
The problem probably is caused because your syntax was using dynamics and mine was using strongly typed IPublished Content
Maybe read these articles to get a insight in the difference : http://www.zpqrtbnk.net/posts/strongly-typed-models-1
is working on a reply...