November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Hi Muller,
So the title property is a custom property that you created in the code base or it is coming from any Addons?
Thanks
Ravindra
I am using Alloy now. It is shown in SEO tab of page. It could me MetaTitle.
Just change the "GroupName" of the title property.
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
[CultureSpecific]
public virtual string MetaTitle { get; set; }
I have MetaTitle as below. My page is inherited from SitePageData. I cannot set MetaTitle in my page.
public abstract class SitePageData : PageData, ICustomCssInContentArea
{
[Display(
GroupName = Global.GroupNames.MetaData,
Order = 100)]
[CultureSpecific]
public virtual string MetaTitle
{
get
{
var metaTitle = this.GetPropertyValue(p => p.MetaTitle);
// Use explicitly set meta title, otherwise fall back to page name
return !string.IsNullOrWhiteSpace(metaTitle)
? metaTitle
: PageName;
}
set { this.SetPropertyValue(p => p.MetaTitle, value); }
}
}
Just change the "GroupName" in SitePageData class because this is also a custom class or do you want to change the tab name for your page only?
Hi Muller,
You can not directly set value values to the epi pages or block. You need to get the instance using IContentRepository and after updating value save it back.
Here is a block will help you.
http://joelabrahamsson.com/working-programmatically-with-local-blocks-in-episerver-7/
Let me know if you are still facing issue.
Thanks
How to change title property of page under SEO tab from code?