Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I has a partial views like this:
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage <li>@Library.NodeById(1021).Name</li>
it will get a error:
Compiler Error Message: CS0103: The name 'Library' does not exist in the current context
how can i use @Library in v7?
thanks very much
Hello,
@Library is part of the old Razor code and should not be used anymore. See more info here: http://our.umbraco.org/forum/developers/razor/44664-Confused-over-when-DynamicNodeList-is-returned?p=0#comment160691
Instead try @Umbraco which is a helper which can do the same. More info here: http://umbraco.com/follow-us/blog-archive/2012/10/30/getting-started-with-mvc-in-umbraco-410.aspx
Somethings like this should work:
<li>@Umbraco.TypedContent(1021).Name</li>
Jeroen
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
The @Library class not available in v7
I has a partial views like this:
it will get a error:
Compiler Error Message: CS0103: The name 'Library' does not exist in the current context
how can i use @Library in v7?
thanks very much
Hello,
@Library is part of the old Razor code and should not be used anymore. See more info here: http://our.umbraco.org/forum/developers/razor/44664-Confused-over-when-DynamicNodeList-is-returned?p=0#comment160691
Instead try @Umbraco which is a helper which can do the same. More info here: http://umbraco.com/follow-us/blog-archive/2012/10/30/getting-started-with-mvc-in-umbraco-410.aspx
Somethings like this should work:
Jeroen
thanks very much
is working on a reply...