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 2017-08-08 22:40:52

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Line break in caption?

Is it possible, in the Album template, to specify you want a line break in the Captions Token field, so that Metadata tokens appear on separate lines?

If I were using HTML (which I know doesn't work here), I would specify something like: "{Title}<br>{Caption}"

Offline

#2 2017-08-08 23:00:40

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Line break in caption?

I think HTML does work in Pangolin, though I would use it sparingly, if at all. Mind you, I have not developed or billed this as a feature; but I think it works, nonetheless.


Matt

The Turning Gate, http://theturninggate.net

Offline

#3 2017-08-09 04:36:58

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Line break in caption?

It doesn't work in the Slideshow caption. If I set the Caption to be:

{Title}<br>{Caption}

When I view the photo in the Slideshow I get something like:

Some sort of title<br/>Some sort of caption

.
It DID fix the HTML by adding the "/" to the closing bracket....

Offline

#4 2017-08-09 10:31:54

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Line break in caption?

What slideshow are you talking about, pangolin-album?


Matt

The Turning Gate, http://theturninggate.net

Offline

#5 2017-08-09 11:27:11

akaufer
Member
From: Santiago de Chile
Registered: 2013-08-05
Posts: 23
Website

Re: Line break in caption?

The text produced by the Tokens entry is inserted to <figcaption></figcaption>. Difficult to add formatting with the text itself.

I use a long hyphen as separator between caption and title. Reads like this:

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

Not exactly what you wanted, but ...

Andreas

Last edited by akaufer (2017-08-09 11:29:47)

Offline

#6 2017-08-09 11:58:18

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Line break in caption?

I just tried adding HTML, and yes, it doesn't work. Which is fine; as I said, was not an intentional feature. Has never been an intentional feature, because it's not something I could guarantee would survive a change or update to dependency libraries, etc.


Matt

The Turning Gate, http://theturninggate.net

Offline

#7 2017-08-09 12:16:43

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Line break in caption?

Any possibility of adding a formatting token, maybe {newline}?

Offline

#8 2017-08-09 15:04:13

Matthew
Administrator
From: San Francisco, CA
Registered: 2012-09-24
Posts: 5,795
Website

Re: Line break in caption?

I sincerely doubt it. Such a token would still need to be converted into equivalent markup (i.e. "<br />"), which I've already said I'm uncomfortable with, as I cannot guarantee formatting across all presentation or library types. For example, maybe we'd support formatting in Fancybox slideshows, but not in Vegas slideshows. I'd rather not support formatting at all, than support it scattershot.

Also, we didn't write most of the token code -- that was kindly provided by Jeffrey Friedl, in an effort to provide some consistency for our mutual customers -- and so I doubt we're going to do much to diverge that code from its source.


Matt

The Turning Gate, http://theturninggate.net

Offline

#9 2017-08-09 20:32:26

Pfredd
Member
Registered: 2014-04-16
Posts: 189

Re: Line break in caption?

Understood. Thanks anyways.

Offline

#10 2017-08-11 00:48:20

akaufer
Member
From: Santiago de Chile
Registered: 2013-08-05
Posts: 23
Website

Re: Line break in caption?

Adopted to your galleries, the "Tokens" entry would be:

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

This would remove the ":" in your figure captions when either {Caption} or {Title} is empty (you have many where {Caption} is empty).

Offline

Board footer

Powered by FluxBB