How can I use Vandelay.TagCloud?

Topics: Writing themes
Jun 2, 2011 at 5:40 PM

Hi:

I need to know how can I use Vandelay.TagCloud in my Blog. I try override the layout of Blog(Layout-Blog.cshtml) and insert a new zone to use TagCloud widget, but it doesn't work.

Thanks yasmany

Jun 2, 2011 at 6:02 PM

Can you give more information, i.e. post your code and explain what you mean by "it doesn't work"?

Jun 2, 2011 at 6:12 PM

I created a file Layout-Blog.cshtml in Views in my new theme. This file contains for example @Display(Model.TagCloud). I include Layout-Blog.cshtml in csproj, but when I ran the site it uses Layout.cshtml.

Is there another way to use TagCloud widget? How can I work with placement.info? Where can I find and example where I see the change of blog layout?

Jun 2, 2011 at 6:21 PM

How are you certain that it's Layout.cshtml that's displaying?

Jun 2, 2011 at 6:23 PM

Wait: let me backtrack on that. Layout.cshtml doesn't have an override for content type name. Instead you need to just add the TagCloud zone to your main Layout.cshtml; then use the Layers mechanism to control where it displays.

Jun 2, 2011 at 6:26 PM

Because I cleared completely the Layout, the only that I still is @Display(Model.TagCloud)

Jun 2, 2011 at 6:28 PM

What happen if zone TagCloud is inside Zone Content, or inclusive more deep (imagine inside another zone in Zone Content)?

Jun 2, 2011 at 6:36 PM

I don't see how that solves your problem. You just need to use Layers to control which widgets appear when. There's no need to delete zones; they just won't be displayed if they're empty.

Coordinator
Jun 2, 2011 at 7:49 PM

You do not have to modify any templates. Just add the widget to a zone from the admin ui and that's it.