photools.com Community

IMatch Discussion Boards => General Discussion and Questions => Topic started by: Jingo on November 29, 2016, 10:20:03 PM

Title: Conditionalizing Thumbnail displays?
Post by: Jingo on November 29, 2016, 10:20:03 PM
Hi Mario.. curious if we can conditionalize items within the thumbnail display editor?  For example.. I would like to only show the number of keywords assigned to an image IF the image actually has keywords...   something like:

IF{{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|count:true}>0 {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|count:true}}
Title: Re: Conditionalizing Thumbnail displays?
Post by: Mario on November 29, 2016, 10:26:13 PM
You can create your own file window layouts. This gives you full control over which elements are displayed, which metadata is displayed etc.

See file window layouts in the IMatch help for all details.

The article Tune Your File Window Layouts (https://www.photools.com/3808/tune-file-window-layouts/) in the IMatch Knowledge Base gives some additional examples.
Title: Re: Conditionalizing Thumbnail displays?
Post by: Jingo on November 30, 2016, 03:47:47 AM
Thanks Mario - yes.. I know we can customize the thumbs.. I really was asking is there a way to conditionalize displaying an item in one of the footer regions?

For example.. I have this code to show the number of keywords:

<Italic>{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|count:true}</Italic>

I would like to only display this value IF there are keywords.. so would like to check to see if this value is >0.. then display.  I tried playing around in VarToy.. but couldn't figure it out.
Title: Re: Conditionalizing Thumbnail displays?
Post by: sinus on November 30, 2016, 08:11:44 AM
Jingo, did you try simply:

{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0}
Title: Re: Conditionalizing Thumbnail displays?
Post by: Mario on November 30, 2016, 09:08:59 AM
Quote from: Jingo on November 30, 2016, 03:47:47 AM
I would like to only display this value IF there are keywords.

Sure. Easiest would be the hasvalue formatting function, which has been created exactly for this purpose.

From the help:

QuoteIf the variable has a value (not NULL, not empty), it will be replaced with Text.
This function is useful if you want to display/emit a specific value (or another tag) if a tag contains data.

Example:

{File.Label|hasvalue:This file has a label}

For your case:

{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|hasvalue:{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0}}

If you want to show some text if a file has no keyword, combine hasvalue with default:

{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|default:No keywords;hasvalue:{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0}}

This variable either shows the keywords, or shows the "No keywords" text if a file has no keywords.

Try that with another DAM  ;)
Title: Re: Conditionalizing Thumbnail displays?
Post by: Jingo on November 30, 2016, 01:08:09 PM
Quote from: Mario on November 30, 2016, 09:08:59 AM
Sure. Easiest would be the hasvalue formatting function, which has been created exactly for this purpose.

Thanks Mario.. exactly what I was looking for.  Funny - I searched the help but didn't know WHAT to search on... the help file is the most complete documentation I have ever run across for a piece of software but I STILL find there are times I can't find things. 


Quote from: Mario on November 30, 2016, 09:08:59 AM
Try that with another DAM  ;)

I wouldn't DARE!  IMatch is the BEST by FAR!

Thanks again.....
Title: Re: Conditionalizing Thumbnail displays?
Post by: Mario on November 30, 2016, 01:33:36 PM
QuoteI searched the help but didn't know WHAT to search on...

That's not uncommon. I try to find the best possible keywords for each help topic (yes, one must add these by hand, one by one). The help system also has a full-text search of course. But even then, sometimes you have to bite the bullet and just read an entire topic to find what you are looking for.

Or ask in your friendly community of somebody has done it before... ;)