I have a Sitecore 7.1 site and I'm trying to figure out what the best way to implement a tag search for a blog is.
Ideally I would like to have a URL like this: /tags/tag-goes-here
There should be an item sitecore/content/home/tags in my content tree so I can edit the content etc using Sitecore. I would want all routes like the above to be mapped to the item and be able to get the "tag-goes-here" parameter into my controller/rendering somehow.
I've tried to use routes but I'm not sure if this is the right approach. It maps to a simple controller but I might be on the wrong track. I've added the following route for this:
routes.MapRoute(
"Tags",
"tags/{tag}",
new
{
controller = "Tag",
action = "Index",
tag = UrlParameter.Optional,
});
It works but does not quite do what I want. It just renders my view in the browser but I can't use Sitecore to add any renderings or content to it as there is no matching item in Sitecore. What would be the best way to approach this in Sitecore MVC?
Thanks.