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
Hello, I am using Model.Name to get the page title of the page, but for Home page I would like to name the page title as the name of the website instead. Can someone point me to the right direction?
<title>@Model.Name</title>
Answering my own question,
@{ var applicationName = "Your Website Name"; } @if (Model.HasValue("metaTitle")) { <title>@Model.Value("metaTitle")</title> } else { if (Model.Id == Umbraco.ContentAtRoot().FirstOrDefault().Id) { <title>@applicationName</title> } else { <title>@Model.Name | @applicationName</title> } }
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
other option to get page title
Hello, I am using Model.Name to get the page title of the page, but for Home page I would like to name the page title as the name of the website instead. Can someone point me to the right direction?
Answering my own question,
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.