AutoTags Umbraco DataType
One of my biggest irritations as a web developer is populating
web pages with content. Ok, it needs to be done, but it can get a
little tedious. One of the more tedious tasks are SEO, and page
categorisation. So wouldn't it be good if you could automatically
generate keywords that relate to the page content, categories for
news articles and tags for blog posts?
With this in mind I have written a Custom DataType for the Umbraco CMS (Version 4) which does exactly this. I've ported Dan Grossman's Open Calais class; written in PHP, to the .Net Framework so it can be used with Umbraco. You can find Dan's PHP class here.
It takes the content from the body of the web page and using the OpenCalais API, generates a list of words which relate to the content. You can then select the words which you feel relate best to the page and even add your own.
Log into your Umbraco instance and navigate to the Developer tab, and select ""Packages"" then ""Install local package"". Follow the steps and it will install the necessary files required to use the datatype, as well as an example XSLT macro.
So once you have added the property to your Document Types, the datatype will render out as in the screenshot below.
Clicking on the 'Get Tags' button will
generate a list of key words. Add a tag by clicking on the '+' next
to the tag and it will appear on the left.
Clicking on the red 'x' will remove a tag from the list.
You can also add your own tag by entering
it in the textbox. These tags may contain spaces and can be removed
in the same way.
Once you're happy with the keywords, save and publish the page.
And there we have it. If anyone can suggest any improvements please feel free.
I am now also hosting this project on our.umbraco.org, and can be found here.
With this in mind I have written a Custom DataType for the Umbraco CMS (Version 4) which does exactly this. I've ported Dan Grossman's Open Calais class; written in PHP, to the .Net Framework so it can be used with Umbraco. You can find Dan's PHP class here.
It takes the content from the body of the web page and using the OpenCalais API, generates a list of words which relate to the content. You can then select the words which you feel relate best to the page and even add your own.
Configuration
Before you can use this DataType, you need to register for an API key. Its free and you can get it here. When you have your key, open up the Web.Config file for your website, and add the following in the <appSettings> element:
<add key=""AutoTags"" value=""APIKEYHERE"" />
Download it here or navigate to the AutoTags project via the
""Projects"" link in the menu at the top of the page and save to to
the desired location.Log into your Umbraco instance and navigate to the Developer tab, and select ""Packages"" then ""Install local package"". Follow the steps and it will install the necessary files required to use the datatype, as well as an example XSLT macro.
Usage
IMPORTANT: In order for the DataType to work, there must be a property with an alias of 'bodyText'. The content of this property will be used to generate the keywords. This is a limitation which I will be working on, so bear with it for now.So once you have added the property to your Document Types, the datatype will render out as in the screenshot below.
Clicking on the red 'x' will remove a tag from the list.
Once you're happy with the keywords, save and publish the page.
And there we have it. If anyone can suggest any improvements please feel free.
I am now also hosting this project on our.umbraco.org, and can be found here.