SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

Meta Tag Generator

with one comment

I was having a look at some of the many SharePoint related projects on CodePlex and the MetaTagGenerator control caught my eye. This is a very simple but useful control for creating tags for pages within a content managed MOSS site. The basic steps described in the documentation are:

1. Create the custom fields you want to generate meta tags for and put them into a particular group (e.g. a ‘meta’ field group).

2. Add these fields to the edit view of your page layout (using the edit mode panel in SharePoint designer).

3. Add the control to your page layout and point it to the group of fields that you want to generate meta tags for.

Now when you edit a page based on that page layout you will see you can enter values for each meta field, and if you view the source after saving the page you will notice the meta tags have been added to the HTML.

While this might have limited use, the same concept can be applied to other situations where you want to customise the output of the meta data stored for a page. For example instead of displaying these fields as meta tags with a simple change to the output you could render each field as a link on the page to find content with similar tags (like the categories on this blog post).

If you are going to do this I would suggest changing the server control to a user control so that it allows you to easily change the presentation i.e. store the HTML in an .ascx file instead of in the code. This will allow you to easily make changes such as changing the uppercase META to lowercase (needed for XHTML compliance) – or even creating a new ascx file that uses the same class – without having to recompile the code.

Post to Twitter Post to Delicious Post to Digg Post to Reddit Post to StumbleUpon

Written by Ari Bakker

July 9th, 2007 at 10:51 am

One Response to 'Meta Tag Generator'

Subscribe to comments with RSS or TrackBack to 'Meta Tag Generator'.

  1. Hi!
    So you're saying this solution actually works?? 🙁
    Ive tried to make it work all this week and I cant even find the deployed feature 🙁

    Can you help me??


    Saludos from Mexico


    18 Sep 09 at 9:39 pm

Leave a Reply