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-11-28 05:23:03

dlangan
Member
Registered: 2016-09-05
Posts: 76

Insert album

Hi there,

On my home page, Insert an album "above the content".  Below the album is a contact form & a review section.  This is all fine BUT I'd like to add a few text lines above the album.  Is this possible? 

I thought that if I added the text in my LR album under Page Copy (md) it might show up but regardless of which page copy placement option I choose, it doesn't work when I load my page (I can see the text when I view the published album).  Am I doing something wrong?

Another thing is that in my LR album, I choose to show 20 items per page but when I load it into my backlight pages, all images show on one page, so the user have to scroll down several pages to get to my other sections.  (I don't know if these two issues are related).

Is seems like there are backlight settings that are over writing my LR album settings.  Any ideas?

Any words of wisdom gratefully received.
Deirdre

Offline

#2 2017-11-28 06:18:19

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

Re: Insert album

dlangan wrote:

Hi there,

On my home page, Insert an album "above the content".  Below the album is a contact form & a review section.  This is all fine BUT I'd like to add a few text lines above the album.  Is this possible?

Yes, but it will take a tiny bit or jQuery. See my post here: http://ttg-tips-and-tricks.barbeephoto. … a-gallery/
But instead of using the .insertAfter method, use .insertBefore
use any name you want for the class applied to the text you want to insert above the gallery. Perhaps "before-text".

dlangan wrote:

Another thing is that in my LR album, I choose to show 20 items per page but when I load it into my backlight pages, all images show on one page, so the user have to scroll down several pages to get to my other sections.  (I don't know if these two issues are related).

I think that this is normal. You're inserting the album images into the page and not necessarily the album settings.


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 2017-11-28 06:28:19

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Insert album

Thank you Rod!  Much appreciated.  I will give that jQuery a try tomorrow.

When you say that you think it's normal for the album settings from LR to not transfer over (say, to view 20 items per page), do you know if there's a way I can set it up again in backlight i.e. so that I can only show 20 items per page?

Thank you again for all of your help,
Deirdre

Offline

#4 2017-11-28 06:35:36

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

Re: Insert album

dlangan wrote:

Thank you Rod!  Much appreciated.  I will give that jQuery a try tomorrow.

When you say that you think it's normal for the album settings from LR to not transfer over (say, to view 20 items per page), do you know if there's a way I can set it up again in backlight i.e. so that I can only show 20 items per page?

Thank you again for all of your help,
Deirdre

Not that I know of. Matt or Ben will need to comment on why album settings don't apply to pages. I suspect it's because Publisher is simply taking the images in the specified album and inserting them inside (and the gallery html) into the page.


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

Offline

#5 2017-11-28 06:40:21

Ben
Moderator
From: Melbourne, Australia
Registered: 2012-09-29
Posts: 4,399

Re: Insert album

Pagination was disabled on embedded albums because of a clash with the 'page' URL parameter.  'page' is used to both denote page numbers for album pagination and to denote the page shown with Pages (e.g. contact, about, etc.). Solving this problem isn't straightforward and hasn't been high on our list of priorities.

Offline

#6 2017-11-28 18:23:16

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Insert album

Okay, thank you Rod & Ben!

Offline

#7 2017-11-28 23:16:10

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Insert album

Hi Rod,

I'm doing something wrong but I don't really understand how & where the code comes together when it's compiled so I must be placing something in the wrong order.  Can you spot what I'm doing wrong please?

So my phpplugin.php looks untouched apart from this function which I modified to look like this:

function _HOOK_( $style, $path ) {
    echo '
<script>$(".before-text").insertBefore($(".the__gallery"));</script>
    ';
    return false;
} // END

And in my backlight page, Page Copy, Main Copy, I have this:

<div class="before-text">
<h3>A heading</h3>
<p>Your text.....</p>
<p>Another paragraph...</p>
</div>

That same page inserts an album "Above the content" (so that contact form is below etc)

Yet my text is showing up below my inserted album/thumbnails.

Any ideas?

Thanking you for any help offered,
Deirdre

Offline

#8 2017-11-28 23:35:04

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

Re: Insert album

Hi Deirdre,

this part is wrong:
function _HOOK_( $style, $path ) {

should be:

function ttg_scripts( $style, $path ) {

_HOOK_ is merely a placeholder to show where the exit hook belongs. Exit hooks are all defined in the phplugins file above the // SET USER FUNCTIONS BELOW line.


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

Offline

#9 2017-11-28 23:43:50

dlangan
Member
Registered: 2016-09-05
Posts: 76

Re: Insert album

Ah brilliant!  Thank you so much Rod.

A life saver yet again :-)

Thank you, Deirdre

Offline

#10 2017-11-28 23:53:04

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

Re: Insert album

smile

I've updated the post to include the whole function rather than just the script.


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

Offline

Board footer

Powered by FluxBB