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
How do we render standard properties in 8. The built in
Doesnt work - it renders nothing...
Try @Umbraco.Field("pageName") instead.
You can use the insert button in the template editor too:
@Sebastiaan I think .Field() has been removed in v8 on UmbracoHelper so we don't have these different methods to extract property values.
So it should just be the following, which inserting a field value also output.
@Claus is pageName a custom property? The node name can be accessed via Model.Name.
Also ensure the page inherits from Umbraco.Web.Mvc.UmbracoViewPage.
Ok just to be clear - i used the built in "Insert value" button. it inserts
wich returns nothing - The same goes for the others like @Model.Value("createDate"), @Model.Value("pageID") and so on.
Bjarne is right. @Umbraco.Field("pageName") doesnt work at all anymore, it throws errors.
@Model.Name works, thanks Bjarne.
So to sum it up, the built in "inset value" is broken when inserting standard system values.
Ah yeah, looks like this is being updated for the next version of 8 already, sorry to mislead you ;-)
I see, you can however access these properties using the properties on IPublishedContent model, e.g.
... and how do you output the different language versions?
Say your main language is English and you were on the Welsh version of the page, how do you output the Welsh page title?
(I hope you don't mind me hijacking your question, Claushingebjerg).
I havent tried language variants yet, but according to a question i asked on the U8 webinar it works automatically by just using @Model.Name - The language variant system takes care of it out of the box.
I could be wrong...
I think this should answer my question.
This was not fixed in 8.01...
I've found these work in a PartialViewMacroPage
For a custom property, try
... and for core doctype properties, try
... and for CheckboxList, you can assign a variable with the following value.
However, I got really stuck trying to get PreValues in the Partial View.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted