Formatting an AutoSlot

Good Afternoon.

I am newly upgraded to 6.5 from 5.6, and i am trying to redo the xsl functionality in velocity. we have an auto slot populating an index page, but the snippets have some additional information that i was unsure how to format. for each regulation, there is an over all category, along with the regulation number and the title. i want to list the items by the category, but i do not want the category heading to repeat if it is the same as the previous entry. I wasn’t sure if this is done in the snippet, the slot, or a macro on the index page.

Thanks
Raj

Not sure I understand your requirement 100%, but we do have several custom index pages. Snippet would just have label/url/delimiter set while rendering is done on index template (very little can be done in a slot). Our index pages usually follow this flow:

  • init slot (raw)
  • loop through slot contents
  • build list on some criteria
  • loop through the list and display what’s needed
    Hope this helps…

Thanks for the response, that does help. a couple of questions:
1- do you use the #for or #macro to go through the slot results?
2- can i reference an item property that is not explicitly output in the snippet?

hope this makes sense…

Thanks
Raj

1- #foreach($relresult in $slotitems)…
2- I don’t think so - it has to be in the snippet

Inside the #foreach, $relresult is an IPSAssemblyResult.

$relresult.getNode().getProperty(“rx:foo”).getString()

or

$relresult.node.getProperty(“rx:foo”).String

should give you the value of the property.

Dave

Thanks, that did it!