Thanks Jako, that works great in the ditto template and returns the expected results - except that the &tplLast (eg without the hr in it) in the ditto call is not honoured for some reason - No matter what I put in there, the hr (and everything else as per the first template) is still included - very weird but that does not matter so much.
On the same page I am having big troubles outputting a RHS submenu to scroll up / down to the relevant Ditto row with the pdfs. I can't get the pagetitle returned with the multiTV method, unless I put the pagetitle in the outer part of the phx statement, but perhaps I am getting the logic wrong? I am definitely getting confused.
Main multiTV output in LHS column (working per your code in the post above):
Page name 1
pdf
pdf 2
Page name 2
pdf
pdf 2
pdf 3
Page name 3
pdf
etc
I am aiming for a Submenu style multiTV output in RHS column:
Page name 1
Page name 2
Page name 3
etc
Ditto call
<h2>Jump to...</h2>
<ul>[[Ditto? id=`content[*id*]` &startID=`0` &depth=`0` &showInMenuOnly=`1` &tpl=`techdata-menuR-row` &orderBy=`pagetitle ASC` ]]</ul>
Ideal row:
[+pdf-multi:isnot=``:then=`<li><a href="#anchor[+id+]" title="[+pagetitle+]">[+pagetitle+]</a></li>`+]
I have been trying without success with a ditto row template of:
[+phx:input=`[[multiTV? &tvName=`files` &docid=`[+id+]` &rowTpl=`multiTV-pdf-rowRHS` &outerTpl=`multiTV-pdf-wrapperRHS`]]`:outer=`<li><a href="#anchor[+id+]" title="[+pagetitle+]">[+pagetitle+]</a></li>`+]
multiTV-pdf-wrapperRHS=
[+wrapper+]
multiTV-pdf-rowRHS =
nbsp;
(if I make it blank nothing is returned)
This returns the 3 items with page titles - but also an nbsp; for each pdf which I obviously don't want.
eg:
<li><a href="/pagename#anchor178" title="Product 1">Product 1</a></li>nbsp;nbsp;nbsp;
There is also a LOT of whitespace between each result - I presume because I am probably not doing this in the best way.
I guess to confirm, I am wanting to return page level (not multiTV level) results IF multiTV files exist.
Any ideas on how to make this work?
Really in this instance
Output
<li><a href="/technical-data#anchor" title=""></a></li>
Also what about...
3. I am also wanting to use multiTV with PHx in a chunk in the website sidebar like so:
[*files:isnot=``:then=`{{button-Tech}}`*]
Is that possible
Many thanks.
[ed. note: nickf08 last edited this post 14 years, 4 months ago.]