Community @ The Turning Gate

Support community for TTG plugins and products.

NOTICE

The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.

This forum is now closed, and exists here as a read-only archive.

  • New user registrations are disabled.
  • Users cannot create new topics.
  • Users cannot reply to existing topics.

You are not logged in.

#1 2020-04-30 03:21:02

pjtraveler
Member
Registered: 2012-11-26
Posts: 243

Can tokens in LR be nested?

I'm trying to figure out a way to optionally have a comma.

If I have a Title, or a Caption, then I want a comma before the Copyright info, but if both Title & Caption are empty then no comma.
Any insight would be appreciated.

Thanks,
:-)

Offline

#2 2020-04-30 06:10:34

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 17,830
Website

Re: Can tokens in LR be nested?

pjtraveler wrote:

I'm trying to figure out a way to optionally have a comma.

If I have a Title, or a Caption, then I want a comma before the Copyright info, but if both Title & Caption are empty then no comma.
Any insight would be appreciated.

Thanks,
:-)

Look at the LUA programming section of the token docs for conditionals
http://backlight.theturninggate.net/doc … lua__token


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site

Offline

#3 2020-04-30 06:57:05

kolohe280
Member
From: Talent, Oregon
Registered: 2017-08-23
Posts: 53

Re: Can tokens in LR be nested?

I did something similar to what you want to do using this code in the caption tokens field:

{Title} {LUA=if Title ~= "" and Caption ~=  "" then return " - " end} {Caption}

It puts a "-" between both the title and caption if the caption exist.

Offline

#4 2020-04-30 10:14:35

pjtraveler
Member
Registered: 2012-11-26
Posts: 243

Re: Can tokens in LR be nested?

Thank you, that looks like the solution
:-)

Offline

Board footer

Powered by FluxBB