Step-by-step instructions for implementing tags functionality
1. Download the needed files to your computer from here
2. Unzip the file, you should see six folders :
3. Folders Temp.Tags
are VS Projects. This two projects provide needed funcionality for working with tags (adding, deleting, editing, selecting...). Temp.Tags
project also contains TagInput control which you will use to select tags for the post. Add these two projects to your website and in effect create a solution.
4. Reference these two projects from your web site.
5. Build solution, if build fails make sure projects have correct references (reference to your local files/versions)
6. Open web.config and in meta fields for blogs add Blogs.Tags meta field. The line should look like this :
|<add key="Blogs.Tags" valueType="ShortText" visible="True" sortable="False" searchable="False" defaultValue=""></add> |
7. While in web.config add section for tags in sectionGroup name="telerik". The line should look like this :
|<section name="tempTags" type="Temp.Tags.Configuration.SectionHandler, Temp.Tags" requirePermission="false" /> |
8. Still, in web.config add tempTags section. Make sure it's immediate parent is <telerik>. The section should look like this :
|<tempTags defaultProvider="Sitefinity"> |
| <providers> |
| <clear/> |
| <add name="Sitefinity" type="Temp.Tags.Data.DefaultProvider, Temp.Tags.Data" connectionStringName="DefaultConnection" visible="true" tagInputTemplate="~/Sitefinity/Admin/ControlTemplates/Tags/TagInput.ascx"></add> |
| </providers> |
| </tempTags> |
9. Next thing we need to do is modify the edit/insert templates for blog posts so that they can be tagged. Open folder ModifiedTemplates
that came in the zipped file. If you have not changed the default templates (in folder ~/Sitefinity/Admin/ControlTemplates/Blogs/) that came with Sitefinity you can overwrite them with those two, otherwise you'll have to make changes manually. If you are making changes manually you'll need to register the TagInput control like this :
|<%@ Register TagPrefix="sfTempTags" Namespace="Temp.Tags.WebControls" Assembly="Temp.Tags" %> |
and also add the control to the page (it is above the publication settings control, so you can see how it is done).
10. Copy the folder Tags
which is inside of the NewTemplates
folder to folder ~/Sitefinity/Admin/ControlTemplates.
Inside of this folder you'll find only one file TagInput.ascx which is the external template for TagInput control (this control is in Temp.Tags.WebControls). NOTE : Do not copy NewTemplates folder, only the Tags folder inside it.
11. Copy the folder MyPages
which came with the zipped file to ~/Sitefinity/Admin
folder. This folder contains page for working with tags that is opened in RadWindow.
12. Now all you need to do is upload and set up public controls. The principle here is exactly same as for the archives, so you read this post
if you need more information on how to do that.
And that's it...
Obviously, this is not the perfect tags solution, hence the Temp prefix to it. In Sitefinity 3.1 a much more powerful tags implementation will be provided by default, but till then I hope this'll work. Also, when 3.1 comes out I will try to provide a user control to transfer your tags.
If I have forgot something or you have any additional questions, please do not hesitate to comment. :)