I’m trying to get Ditto to pull a &tpl value from a TV. This is to allow the user to choose a custom chunk from a drop down list in the Edit Document area. I keep getting invalid chunk name warnings. Here’s what I’ve got:
Ditto Call:
[[Ditto? &documents=`[*documentID-1*]`&tpl=`[+documentID-1-Preview+]` ]]
TV:
documentID-1-Preview
Input Type: DropDown List Menu
Input Option Values:
1==PortfolioSample1.tpl||2==PortfolioSample2.tpl||3==PortfolioSample3.tpl
Chunk Sample:
Name: PortfolioSample1.tpl
<a href="[+PortfolioThumbnailFull+]" class="image-thumb" rel="lightbox" title="[+PreviewButtonImageTitle+]"><img src="[+PortfolioThumbnail+]" alt="Thumbtack" /></a>
<h3>[+title+]</h3>
<p>[+content+]</p>
<p class="responsibility"><small>Our Responsibilties</small></p>
<p class="skill">[+OurResponsibilities+]</p>
<a href="[+PreviewButtonImage+]" class="buttonlink" rel="lightbox" title="[+PreviewButtonImageTitle+]">Preview</a>
The result I get from the above is that my page renders, but in place of the ditto call I get this warning:
&tpl either does not contain any placeholders or is an invalid chunk name, code block, or filename. Please check it.
I double-checked my spelling on both the Chunk name and the TV name. I also manually typed in a &tpl value and everything worked fine. But when trying to pull the &tpl value from the TV it doesn’t work. Any other suggestions?
Thanks!