Custom Template Condition List

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
DGarza
User
Posts: 152

Custom Template Condition List

Post by DGarza »

Hi everyone,

Before I used the custom template, I have on Row_Rendered some conditions for change the background of my cell, but when I created my custom template, those conditions didn't apply

So, how can I add the same condition on custom template?

Thanks


DGarza
User
Posts: 152

Post by DGarza »

I tried with this on custom template

{{if {{{value Status}}} == "Baja"}}
       <td data-name="Status" class="bg-info">
             {{{value Status}}}
        </td>
{{else {{{value Status}}} == "Alta"}}
        <td data-name="Status" class="bg-warning">
             {{{value Status}}}
        </td>
{{/if}}

But I have and error


arbei
User
Posts: 9787

Post by arbei »

Remember that {{{value fieldname}}} tag is HTML, you cannot use them in conditions, you should use {{{dbvalue}}}, read Custom Template Tags on how to use.


DGarza
User
Posts: 152

Post by DGarza »

<td data-name="Status" class="bg-success">
{{: {{{dbvalue Status}}} }}
</td>

This is the correcto syntax, now i need to figure out how to implement this in a if.


Post Reply