Keywords as a list in FWT

Started by Darius1968, May 05, 2022, 11:25:09 PM

Previous topic - Next topic

Darius1968

I can get my keywords enumerated as a list in VarToy with this statement:  {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}}
However, that statement has no effect in the File Window Tip.  Why and how can I make it so? 

Mario

Variables always work the same. Double-check your syntax.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

I originally checked the syntax.  And, just now, checked it again - I did a copy/paste from my entry in VarToy into the FWT...Doesn't work in FWT! 

Mario

What "does not work" mean?
No output? Different output?...
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Darius1968

The output in FWT - using {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}} - is just each keyword displayed one right after another - There is no new line, nor is each keyword separated with a semicolon. 

JohnZeman

You need to add one more thing to your configuration, a pereplace operation that follows the replace operation.

Below is my configuration to display hierarchal keywords in a list format, one hierarchal keyword per line as you can see in the attached screenshot.

<Run Foreground='#cccccc' FontWeight='Normal' FontSize='14'>Hierarchal Keywords:</Run><LineBreak/>{File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;==XXX;pereplace:XXX==<LineBreak/>}

The replace operation only temporarily replaces each ; with something that will never be found in my keywords, for that I used XXX.
Then pereplace, which works after replace is finished, replaces each XXX with a linebreak.

See the https://www.photools.com/help/imatch/var_basics.htm help page for more information.

Darius1968


Mario

Quote from: Darius1968 on May 06, 2022, 12:59:24 AM
The output in FWT - using {File.MD.XMP::Lightroom\hierarchicalSubject\HierarchicalSubject\0|replace:~;=={lf}} - is just each keyword displayed one right after another - There is no new line, nor is each keyword separated with a semicolon.
That is to be expected. The File Window (and Tip) use XAML for rendering (sort of HTML), and line feeds have no meaning there - they are ignored. This is not the effect you want.
As John explained above, you need to insert <LineBreak/> instead, which produces a new line in XAML.

See Variables and search for LineBreak for a number of examples and more in-depth explanation.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook