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
Hi All
In my Content editor, when I create a new (in my case) NewsItem, I can then "Enter a name..." . How can I access this name in the settings section? I need to display it on my webpage.
Thanks.
Tony
Hi Tony,
The name that you enter in the "enter name" field when you create a new news item, is the node name of the page.
So you can get this in Razor if you are in dynamic Razor you can do
@CurrentPage.Name
If you are in strongly typed context, then you need.
@Model.Content.GetPropertyValue("Name")
or which will gives you the same
@Model.Content.GetPropertyValue<string>("Name")
Hope I have understood your question correctly.
/Dennis
Hi Dennis
Spot on! That's exactly it. Thanks you saved my bacon!
Tony :)
Hi Tony
You´re welcome, glad that I could help you :-)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
display "Enter a name..."
Hi All
In my Content editor, when I create a new (in my case) NewsItem, I can then "Enter a name..." . How can I access this name in the settings section? I need to display it on my webpage.
Thanks.
Tony
Hi Tony,
The name that you enter in the "enter name" field when you create a new news item, is the node name of the page.
So you can get this in Razor if you are in dynamic Razor you can do
If you are in strongly typed context, then you need.
or which will gives you the same
Hope I have understood your question correctly.
/Dennis
Hi Dennis
Spot on! That's exactly it. Thanks you saved my bacon!
Tony :)
Hi Tony
You´re welcome, glad that I could help you :-)
/Dennis
is working on a reply...