I register some global tags like this; template.SetTag("Global:NiftyTag", "stuff");
which is working fine.
Now I tried to create a loop, like this:
foreach (Group group in groups)
{
this.DebugMessage("Name: " + group.Name);
Dynamicweb.Templatev2.Template loopTemplate = template.GetLoop("Global:ProductCategories");
loopTemplate.SetTag("GroupName", group.Name);
loopTemplate.SetTag("GroupSmallImage", group.SmallImage);
loopTemplate.SetTag("GroupLink", "Default.aspx?ID=" + pageID + "&GroupID=" + group.ID);
loopTemplate.CommitLoop();
}
<!--@LoopStart(Global:ProductCategories)-->
<a href="<!--@GroupLink-->"><!--@GroupName--></a>
<!--@LoopEnd(Global:ProductCategories)-->
Which is producing the following output, indicating the loop is undefined:
<!--@LoopOutput(Global:ProductCategories_0)-->
How can I get this working?