Hi
I am trying this html with no luck
<!--@LoopStart(FacetGroups)-->
<!--@LoopStart(Facets)-->
<!--@LoopStart(FacetsOptions)-->
<!--@DwTemplateTags-->
<!--@LoopEnd(FacetsOptions)-->
<!--@LoopEnd(Facets)-->
<!--@LoopEnd(FacetGroups)-->
However this works fine in Razor
@foreach (LoopItem facetGroup in GetLoop("FacetGroups"))
{
foreach (LoopItem facet in facetGroup.GetLoop("Facets"))
{
foreach (LoopItem option in facet.GetLoop("FacetOptions"))
{
var value = option.GetValue("FacetOption.Value");
var selected = option.GetBoolean("FacetOption.Selected");
var label = option.GetString("FacetOption.Label");
var count = option.GetInteger("FacetOption.Count");
@TemplateTags()
}
}
}
Am i doing something wrong, or is it not possible to loop facets in html templates?
I want to use this to write a simple JSON, but keep getting an error in the Razor code. If it is not possible to loop facets in HTML templates, does someone have a Razor example that writes a facets based JSON file?
Thanks in advance.
Br, Hans