I would like to produce a series of unordered lists representing the data from a container with agents.
Data looks like this:
Tags (container)
tagA (agent)
note 1
note 2
tagB (agent)
note 1
note 3
tagC (agent)
note 3
I have tried to amend @mwra 's useful code from the aTBref file for generating the sitemap. Here’s what I ended up with (this Template note is called “AllTagger” and it is calling itself):
<li>^linkTo(this)^
^if($ChildCount & $HTMLExportChildren)^<ul>^descendants("AllTagger")^</ul>^endIf^</li>
I had to remove the !IsAlias from the if
condition to collect the notes from the agent. I also had to change children
to descendants
to pick up the notes collected by the agent.
So, the export is returning all of the notes that I want when the above template is applied to the Tags
container note at the top of the tree.
However, it’s not returning them in a hierarchal form. The Tags
container appears as an item at the top of the list, then indented one level come all the other notes:
* Tags
* tagA
* note1
* note2
* tagB
* note1
* note3
* tagC
* note3
How can I make the notes indent one level in the hierarchy with this recursive template?