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.
You are not logged in.
Pages: 1
Hello again!
I'd like to put my photo caption on two lines.
Like doing this
{Title}"<br>" {Caption}
Thanks
Offline
can't be done, html won't work in the caption field. You can add a separator, like a bar | though.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hum... a way with css?
Offline
no. That would take separating text with html elements, like a span with a class. But html added to the caption fields will just be output as regular text.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Well, thanks.
last thinking !... if I don't use this caption field but add 2 separate lines below the image with css?
Offline
Not with css.
Would you be putting the same info below each image? if so, you might try jQuery.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Or maybe using the single_bottom hook in phplugins and adding the same text under each image
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Actually, try looking the the phplugins-pangolin-sample.php file (found in the unzipped Backlight download: backlight/custom/phplugins
check out the function starting on line 546, which displays the file name and photo dimensions above the image. This looks like it might be the best option, modifying so that the info shows under the image.
You could try using single_bottom along with $photo->getMetadata(Photo::$PHOTO_CAPTION) : '';
Not tested, but maybe:
function single_bottom()
{
if ($this->hasPhoto()) {
echo '<p>';
echo 'Caption: '.$this->photo->getMetadata(Photo::$PHOTO_CAPTION).'<br/>';
echo 'Title: '.$this->photo->getMetadata(Photo::$PHOTO_TITLE);
echo '</p>';
}
return true;
} // END /**/
if you want just the caption and title and not
Caption: this is the caption
Title: this is the title
then try removing 'Caption: '. from the caption line and 'Title: '. from the title line.
You might want to remove any tokens from the caption field in the template
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
OK. I will try that.
By the way, there is all what I want in the Metadata Display of thumbnail grid.
It may be something to be added to the large images. I think it was there in CE4. could we ask Mat?
Offline
You can do many things using single-page view. Have a look at https://danielleu.com/galleries/united_ … single.php
And some technical background infos: https://lab.danielleu.com/blog/customiz … page-view/ and https://lab.danielleu.com/blog/better-u … age-pages/.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
OK. I will try that.
By the way, there is all what I want in the Metadata Display of thumbnail grid.
It may be something to be added to the large images. I think it was there in CE4. could we ask Mat?
You just did
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
thank you both of you.
Offline
Pages: 1