I don't know what 'key image - value null' means. But if you want to
set the display attribute based on your if test, I think what you want is
data-ex-style-subcontent = "display: {{'if(...your stuff...)'}}"
On 11/24/2015 3:37 AM, Jay Gray wrote:
>
> Roger that David.
>
> Here is a working Exhibit:
>
> http://ontomatica.com/public_new/project/test/Exhibit_implementations/Exhibit_images_seeds/index_exhibit_4_.html
>
> Am using this expression:
>
> <div data-ex-display-style-subcontent="{{ if(not(exists(.image)),
> 'block', 'none') }}">
> <img src="NoImageAvailable.png" />
> </div>
>
> In original JSON, a null URL was set as follows:
> "image": "",
>
> Let's call this 'key image - value null'
>
> For 'key image - value null' the above expression doesn't work.
> Example is "Pepper, Early Jalepeno".
>
> However, if I delete 'key image - value null' from the items file, the
> expression does work. Examples are "Pepper, Anaheim" and "Pepper, Cal
> Wonder".
>
> Would like to keep the 'key image - value null' fields in the JSON
> items file to simplify addition of new images in the future. Is there
> a way to re-write the expression to handle the 'key image value null'
> condition?
>
> Also have a second issue in the same Exhibit.
>
> For Zones, the expression is set as:
>
> data-ex-show-missing="false"
>
> However, the number of keys with missing values does appear in the
> facet list.
>
> What am I doing wrong here?
>
> ----
>
> On Monday, November 23, 2015 at 2:43:23 PM UTC-6, Jay Gray wrote:
>
> I have a structure below that worked for Exhibit 2.
> If an image is not available, the image
> 'NoImageAvailable.png' is used in its place.
>
> <td valign="bottom" class="itemThumbnail-thumbnailContainer">
> <div style="position: relative">
> <div class="itemThumbnail-blocker"></div>
> <div ex:if-exists=".image">
> <img ex:src-content=".image" />
> </div>
> <div ex:display-style-subcontent="{{
> if(not(exists(.image)), 'block', 'none') }}">
> <img src="NoImageAvailable.png" />
> </div>
> </div>
> </td>
>
> However, its equivalent for Exhibit 3 does not work:
>
> <td valign="bottom" class="itemThumbnail-thumbnailContainer">
> <div style="position: relative">
> <div class="itemThumbnail-blocker"></div>
> <div data-ex-if-exists=".image">
> <img data-ex-src-content=".image" />
> </div>
> <div data-ex-display-style-subcontent="{{
> if(not(exists(.image)), 'block', 'none') }}">
> <img src="NoImageAvailable.png" />
> </div>
> </div>
> </td>
>
> meaning that NoImageAvailable.png is not displayed when a planned
> image is not available.
>
> What am I doing wrong?
>
> /jg
>
> --
> You received this message because you are subscribed to the Google
> Groups "SIMILE Widgets" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected]
> <mailto:[email protected]>.
> To post to this group, send email to [email protected]
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/simile-widgets.
> For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"SIMILE Widgets" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/simile-widgets.
For more options, visit https://groups.google.com/d/optout.