My client has a portfolio listing, where they want to show all projects (children) in a category (to display certain metadata that I am going to grab from TVs), but only link to select projects that have a gallery within them.
I am trying to do it like so:
[!Ditto? &startId=`38` &tpl=`dittoPortfolio` &orderBy=`pagetitle ASC` &phx=`1`!]
and the contents of dittoPortfolio:
<tr>
<td>[+phx :if=`[+portfolioActive+]` :is=`0` :then=`<a href="[~[+id+]~]">[+description+]</a>` :else=`[+description+]`+]</td>
<td>[+phx :if=`[+portfolioActive+]` :is=`0` :then=`<a class="view_project" href="[~[+id+]~]">View Project</a>` :else=` `+]</td>
<td>[+portfolioLocation+]</td>
<td>[+portfolioDate+]</td>
<td>[+portfolioProgress+]</td>
</tr>
I am not getting any results for the PHx parse.
edit: I was not understanding how the PHx parser in Ditto worked. The correct syntax is:
<tr>
<td>[+portfolioActive:is=`0`:then=`<a href="[+~id~+]">[+description+]</a>`:else=`[+description+]`+]</td>
<td>[+portfolioActive:is=`0`:then=`<a class="view_project" href="[+~id~+]">View Project</a>`:else=` `+]</td>
<td>[+portfolioLocation+]</td>
<td>[+portfolioDate+]</td>
<td>[+portfolioProgress+]</td>
</tr>