How to set page meta-description from single news item summary
When viewing a single news item, the title of the page is automatically set to the title of the news item being viewed. I'd like to also set the meta-description of the page to the summary of the news item...
<meta name="description" content="news item summary" />
Can this be done within the Sitefinity UI, or do I need to write code? Any guidance on this would be greatly appreciated (I'm a Sitefinity newbie).
I'm running Sitefinity v4.3.1885.0.
Hello,
This feature is not yet available in Sitefinity. Here you can read more about it:
http://www.sitefinity.com/devnet/forums/sitefinity-4-x/suggestions/seo-fields-for-news-and-blog-items.aspx
Hi, this page links to nothing and I am trying to find out how this would work. If we need to alter our news item, that's fine, but do you have any advise on how to do that? We need to have the Tags, and Summary pulled into the header meta tags for SEO. Thanks
Hi Jason,
This still has not become a fully supported feature in Sitefinity, however, you can link to the code behind in your widget and programmatically add it to your page.
In the header put this
<
asp:PlaceHolder
id
=
"MetaPlaceHolder"
runat
=
"server"
/>
HtmlMeta meta =
new
HtmlMeta();
meta.Name =
"description"
;
meta.Content =
"MyNewsSummaryString"
;
MetaPlaceHolder.Controls.Add(meta);