Looping Through a Widget Collection
Suppose that you have created three widgets in Graffiti CMS that you wish to display on all of your pages, with one exception. On the home page you wish to only display two of the three widgets. In order to accomplish this task you can get a list of the current widgets and display only two of them rather than all three.
This would look something like the following snippet of Chalk code:
#foreach($rw in $data.RightWidgets())
#if($rw.Title != "Site Options")
$rw.Render("<li class='widget'>", "<h2>", "</h2>", "</li>")
#end
#end
Here we are saying loop through all of the widgets in the right sidebar, but do not render the sidebar item which has a title of "Site Options". That's all there is to it!
4/9/2008

What if I have a widget that I want to show up ONLY when one specific category is selected? I want this widget hidden on all other pages/categories/tags.
My current layout.view section that displays the sidebar is:
$macros.RightSideBar("%{beforeWidget='<li>', afterWidget='</li>', beforeTitle='<h2>', afterTitle='</h2>'}")
Many thanks for any help you could provide!!