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.
I am looking to add a specific button to each image on an album (not a cart). I know there is a write-in button but it is for add-to-cart, I want to be able to add my own button to each image on the gallery grid. Is there a way to do this? BTW, I know how to create the button and add it to an image but have not done so using the backlight album img grid. Any suggestions or has someone done this already?
Offline
one idea comes to mind. Create an album template that used the colored label grid icon. Maybe make it a Cart enable album as well.
Use the inspector to see where those elements are added.
Use jQuery to insert your own buttons into the the ul or whatever is adding those grid icons.
If you don't want the buttons to show up on the smaller thumbnails necessary for mobile us, write a css media query to hide the buttons.
this might work if all the buttons have the same code. If not....I don't know. You'd probably have to write code that interrogates the database since I believe that's where the individual image info comes from.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Yeah, I had the same idea but since each button code is unique to the image it would be difficult to do. BTW, I do know where the elements are added. Another idea I had was to use the Theater Blank Page and do my own thing - not my preference.
Also, if I knew the functions that Ben uses to interrogate the database I would use that. I may have to hunt and peck through the code to find them though. I try not to reinvent the wheel if someone already has. lol!!!
I just had another idea, I could use an iFrame and build my own HTML image Page Container and thus have control of adding the buttons to the images.
Unless Ben or Matt have any better ideas!!!!
Last edited by mad (2019-02-27 02:27:40)
Offline
Have you seen that Theater has the Pym embedded i-frame feature?
http://backlight.theturninggate.net/doc … tation_pym
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Have a look at the album_top example in the phplugins sample file. You might need to download the installer again to get the latest version.
This shows you how you can replace the entire grid. Now you can write your own code to create the grid and add your custom button wherever you want to have it. I would assume that your code would be based on the current implementation in order to leverage the existing css and full page view.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Have a look at the album_top example in the phplugins sample file. You might need to download the installer again to get the latest version.
This shows you how you can replace the entire grid. Now you can write your own code to create the grid and add your custom button wherever you want to have it. I would assume that your code would be based on the current implementation in order to leverage the existing css and full page view.
I'd forgotten about that. How cool.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Daniel I want to thank you for your suggestion, I implemented the album_top plugin function of course with much different coding but I figured out that I did not need a button over the image at all; I just modified the behavior of the image itself to be the button and pass on the information I needed it to have so it could load the next cart album correctly. I now have all my albums going through this function in my plug-in. So, Daniel I want to thank you for pointing me into the right direction.
Here is a link to how my albums are functioning if you would like to check it out: https://kp.keylightphotography.us/galle … lryprdcrt/ You can click on any image and it will build the images for the cart based on which product you selected. It is Context-Sensitive Albums now with everything else that I have done on my site dynamically.
Thanks again Daniel much appreciated.
Offline
Whao! Mad, how do you have implemented your "i" button on the album thumbnails?
Really nice to have a popup displaying metadata.
Nico
Offline