I haven't had any problems like this before, so i'm a bit lost here.
I'm working on a template, that has a document type associated to it with some custom fields like phoneNumber and zipCode.
If i render the custom fileds in the template like:
@Umbraco.Field("phoneNumber")
it shows up just fine. But when i choose any of the standard fields like @Umbraco.Field("pageName") it renders nothing. I've tried with all of the standard fields and none of them shows up.
Just for testing i created a razor script that simply output the pageName like @Model.pageName and then inserted the razor macro in the template, and that worked.
Why doesn't the standard fields show?
Hi,
I haven't had any problems like this before, so i'm a bit lost here.
I'm working on a template, that has a document type associated to it with some custom fields like phoneNumber and zipCode.
If i render the custom fileds in the template like:
@Umbraco.Field("phoneNumber")
it shows up just fine. But when i choose any of the standard fields like
@Umbraco.Field("pageName") it renders nothing. I've tried with all of the standard fields and none of them shows up.
Just for testing i created a razor script that simply output the pageName like @Model.pageName and then inserted the razor macro in the template, and that worked.
What am i doing wrong?
Using 7.0.1, MVC mode
Hi Patrik,
I had the same question. I got around it by using Model.Content.Name in my partial view. Hope it helps.
Cheers
Bjørn Fridal
Had the same problem right now and I found a pretty simple solution, I use @CurrentPage.Name (I figured out this after a look at this http://our.umbraco.org/documentation/Cheatsheets/DynamicNodeRazor.pdf)
is working on a reply...