Custom Thumb Info code request: 'in portfolio' indicator / counter

Post Reply
Mke
Posts: 256
Joined: 15 Jun 14 15:39

Custom Thumb Info code request: 'in portfolio' indicator / counter

Post by Mke » 30 Jan 17 3:00

Sadly I'm not much of a coder, so I'm wondering if anyone may have time to provide some code that would display an indicator in the Custom Thumb Info to indicate that an image is a member of a portfolio collection? Or maybe even a counter to show the number of collections it's in?

Or maybe someone could point me to some code that I might have a chance of adapting?

Thanks in advance!

Maxometr
Posts: 28
Joined: 04 Apr 12 7:27

Re: Custom Thumb Info code request: 'in portfolio' indicator / counter

Post by Maxometr » 30 Jan 17 4:45

Try this:

%CatalogPortfolioList{encode=html}

Mke
Posts: 256
Joined: 15 Jun 14 15:39

Re: Custom Thumb Info code request: 'in portfolio' indicator / counter

Post by Mke » 30 Jan 17 14:59

Yes thanks for the idea. That lists the portfolios, which helps (as does %xmp:ics:Portfolios{encode=html}), but since I'm short on screen space I was hoping for just an indicator (or counter) - more like the result of applying

%ImageHasCatLabels{encode=html}

...but there doesn't seem to be an inbuilt equivalent for portfolios, unless I've missed it.

DirkS
moderator
Posts: 5221
Joined: 25 May 08 14:28
Location: Essex, UK

Re: Custom Thumb Info code request: 'in portfolio' indicator / counter

Post by DirkS » 30 Jan 17 18:30

This should add 'PF' when the image is in a portfolio:

Code: Select all

%code result := iif(Length('%CatalogPortfolioList{encode=html}')>0,'PF',''); %/code
You can add this code to the custom thumb info (either on a separate line or add it to an existing line.
Problems searching the forum? Try Google Site Search by adding 'site:forum.idimager.com' to a standard Google search.

Mke
Posts: 256
Joined: 15 Jun 14 15:39

Re: Custom Thumb Info code request: 'in portfolio' indicator / counter

Post by Mke » 31 Jan 17 1:11

Many thanks Dirk, that's just what I had in mind; much appreciated :)

Post Reply