HTML5 Data Bindings Formatter Support Product Page

If statements to do the following...

Asked 14 Apr 2014 22:53:29
1
has this question
14 Apr 2014 22:53:29 Danny Dominguez posted:
I have been trying to find a way to display 2 different results based on column named imageEXT. If the record contains a jpg extension then I would like for the jpg image to show on my dmxzone lightbox. But if the record contains pdf extension then I want the pdf file to show.

I tried using the code below but it displays the jpg image and the pdf link when the record has a jpg extension.

<span data-binding-show={{imageEXT.contains( &quot;jpg&quot; )}}> jpg image</span>

<span data-binding-show={{imageEXT.contains( &quot;pdf&quot; )}}> pdf file</span>

With php I can display what I want with
<?php if(recordset[imgEXT]=jpg) { ?>
<img src=img.jpg>
<?php } else { ?>
pdf-file.pfp
<?php } ?>

Below is the link for the page that I am working
17482 is a jpg and 17481 is a pdf
dannywebdesigns.com/plugins/quotesSection/quotes-plugin.php

Replies

Replied 15 Apr 2014 09:19:19
15 Apr 2014 09:19:19 Teodor Kuduschiev replied:
Hello Danny,
Please try using
{{imageEXT == jpg}} and {{imageEXT == pdf}}

Reply to this topic