Hey guys
Im running into something that presumably easy to do. I just haven’t managed.
Im trying to have to different templates used by the same snippet and called within the same document. I haven’t figured out a way to do that. At the moment the template parses through the defaults rowTpl template that i have set for it.
[[!mySnippet]] (where templateOne is default)
[[!mySnippet &templateTwo=`templateTwo`]]
I tried this sort of code: (but to no avail)
if(isset($templateOne)){$output .= $portf->getChunk($modx->getOption('tpl',$scriptProperties,'templateOne '),$itemArray);}else {$output .= $portf->getChunk($modx->getOption('tpl',$scriptProperties,'templateTwo '),$itemArray)}
Anyone have an idea on how I should tackle this? Im new to creating snippets/components
many thanks and peace