Hi, I have a problem getting the output that I want. After spending nearly 2 hours on this thing, my conclusion is that this must be a bug.
I have FACET loop that looks like this
[
<!--@LoopStart(FacetGroups)-->
<!--@LoopStart(Facets)--><!--DwTemplateTags-->
<!--@LoopStart(FacetOptions)-->
<font color="red"><!--@Facets.LoopCounter--></font> <!-- this is just an output to make shure that the value I am testing against on the line below actually is what I assume -->
<!--@If(FacetOptions.LoopCounter>1 || Facets.LoopCounter=2)-->,<!--@EndIf-->
{
{
"name":"<!--@FacetOption.Label.JSEncoded()-->",
"web": "http://www.skyn.fo?<!--@Facet.QueryParameter-->=<!--@FacetOption.Label.JSEncoded()-->",
"resultcount": <!--@FacetOption.Count-->,
"keywords": [
]
}
<!--@LoopEnd(FacetOptions)-->
<!--@LoopEnd(Facets)-->
<!--@LoopEnd(FacetGroups)-->
]
This outputs this result
[ 1 { { "name":"Argir", "web": "http://www.skyn.fo?City=Argir", "resultcount": 1, "keywords": [ ] } 1 , { { "name":"Sørvágur", "web": "http://www.skyn.fo?City=Sørvágur", "resultcount": 1, "keywords": [ ] } 1 , { { "name":"Toftir", "web": "http://www.skyn.fo?City=Toftir", "resultcount": 1, "keywords": [ ] } 1 , { { "name":"Tórshavn", "web": "http://www.skyn.fo?City=Tórshavn", "resultcount": 4, "keywords": [ ] } 1 , { { "name":"Tvøroyri", "web": "http://www.skyn.fo?City=Tvøroyri", "resultcount": 1, "keywords": [ ] } 1 , { { "name":"Velbastaður", "web": "http://www.skyn.fo?City=Velbastaður", "resultcount": 2, "keywords": [ ] } 2 { { "name":"Eysturoy", "web": "http://www.skyn.fo?District=Eysturoy", "resultcount": 1, "keywords": [ ] } 2 , { { "name":"Nólsoy og Heystur", "web": "http://www.skyn.fo?District=Nólsoy og Heystur", "resultcount": 1, "keywords": [ ] } 2 , { { "name":"Suðuroy", "web": "http://www.skyn.fo?District=Suðuroy", "resultcount": 2, "keywords": [ ] } 2 , { { "name":"Suðurstreymoy", "web": "http://www.skyn.fo?District=Suðurstreymoy", "resultcount": 5, "keywords": [ ] } 2 , { { "name":"Vágar", "web": "http://www.skyn.fo?District=Vágar", "resultcount": 1, "keywords": [ ] } ]
To my best knowledge, I should get a Comma seperator as soon as Facets.LoopCounter=2, but this is not the case. The Facets.LoopCounter does get the value 2 as i am optputting for debugging in my loop, but the IF statement doesn´t catch this.
Look at this picture http://www.screencast.com/t/7VTZCs4wnf
for reference, the output page is here http://skyn.dw9.dynamicweb-cms.com/Default.aspx?ID=13&Purge=True