meta description, keywords and canonical links for site & blog themes.
- meta descriptions for: weblog, forum and media posts; weblog pages (which are weblog posts); forum threads; sections, groups and user pages.
- keywords for: weblog, forum and media posts; weblog pages; and tag pages.
- canonical links for: weblog, forum and media posts; weblog pages; forum threads.
note that forum posts seem to be getting their keywords from somewhere else already !
adapted from http://dev.communityserver.com/forums/t/500269.aspx, by Alex Crome, with modifications.
- 2009.06.20: fix for forum post v. thread handling; remove cruft
- 2009.05.06: added canonical url element for blog, forum and gallery items.
- 2008.10.24: fixed keyword list rendering from categories / tags.
usage:
- site theme:
-
extract and copy metadesc.ascx to ~/themes/(site theme name)/common
then, in ~/themes/(site theme name)/common/master.master, place
<%@ Register TagPrefix="CSUserControl"
TagName="MetaDesc" Src="MetaDesc.ascx" %>
with the other @Register's, and place
<CSUserControl:MetaDesc runat="server" />
before <head runat="server">
- blog theme (for each theme that you use):
-
extract and copy metadesc.ascx to ~/themes/blogs/(blog theme name)
then, in ~/themes/blogs/(blog theme name)/theme.master, place
<%@ Register TagPrefix="CSUserControl"
TagName="MetaDesc" Src="MetaDesc.ascx" %>
with the other @Register's, and place
<CSUserControl:MetaDesc runat="server" />
before <head runat="server">