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 have inserted the slideshow above the Page Copy at my frontpage and want a text heading above the slideshow
See: https://britogtruls.no/
In Rods tips page "How about text above and below a gallery?" I have seen a way to do this with thumbnails, but it seems to not work with my slideshow. I have tried to put my text into the Album Copy - above the gallery.
Is there a solution for this?
Last edited by post@trulsellefsen.no (2018-09-25 20:35:58)
Offline
It's working for me: http://backlight-2-100.barbeephoto.com/ … irst-test/
The jQuery isn't in your page source, plus there's no page text anyway.
Be sure you're using the proper phplugins syntax as it's changed since Backlight 1
http://community.theturninggate.net/vie … hp?id=8966
And don't use your existing BL1 phplugins file. There is new code for Backlight 2. Start with the backlight.php phplugins file found in /backlight/custom/phplugins/. Delete or comment out the example functions and put your code in the user area. Be sure to remove the arguments from ($style, $path) to simply ()
I've updated that post: http://ttg-tips-and-tricks.barbeephoto. … a-gallery/
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Is there a guide on how to use jQuery in Backlight? I have never used it before...
Offline
Following code adds some text at the top of the page before any galleries or page copy text. If you like to have some text on another page, just use the respective slug in the string comparison. There is no need to use jQuery.
function main_top( ){
// Add some specific text to the home page above the gallery slideshow
if (strtolower($this->slug) == 'home') {
echo '<h1>Welcome</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam placerat magna id elit auctor, a commodo tellus mollis. Fusce enim augue, dictum vitae erat vel, volutpat scelerisque mi. Quisque ornare fringilla mi vel fringilla. Phasellus nisl erat, vestibulum at est ullamcorper, accumsan congue lorem. Pellentesque placerat, erat ac porta egestas, magna ante sollicitudin sapien, tristique pellentesque metus metus in lectus. Nulla ut dui vel purus semper sodales id nec magna. Duis at lorem felis. In hac habitasse platea dictumst.
</p>
';
}
}
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
But if you want to add text on a page by page basis, use jQuery and wrap your text in the indicated classes.
There is no guide for jQuery specific to Backlight. Just use one of the many books on jQuery, the oficial docs: https://api.jquery.com , or try an online course from a source like Lynda.com.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
But if you want to add text on a page by page basis, use jQuery and wrap your text in the indicated classes.
There is no guide for jQuery specific to Backlight. Just use one of the many books on jQuery, the oficial docs: https://api.jquery.com , or try an online course from a source like Lynda.com.
Rod, my code already targets a page. In the example code, it is the home page.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
I was thinking “per album” actually, like if you needed specific text in different albums then it would be easier to enter that in the actual album text than needing to edit a phplugins file.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I was thinking “per album” actually, like if you needed specific text in different albums then it would be easier to enter that in the actual album text than needing to edit a phplugins file.
If you have to add a lot of text to different albums, it is definitely easier using the album settings than having to edit phplugins all the time.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
Rereading the original post, I finally caught up to the fact this is an album inserted in a page. In that case, any text entered in the album copy wouldn’t appear on the page anyway.
I’ve not tried entering text in the page copy that I wished to have appear above or below the inserted album. If you don’t want to use phplugins, then try entering the text in the page copy rather than the album copy.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
I’ve not tried entering text in the page copy that I wished to have appear above or below the inserted album. If you don’t want to use phplugins, then try entering the text in the page copy rather than the album copy.
It works as expected. I have added some text in my home page's 'Pallet 01 Copy' and it appears on my page.
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline
I used a modified version of Daniels code, as I wanted the text to apear above the album at the home page ("forside" in norwegian):
function masthead_secondary_bottom()
{
// Add some specific text to the home page above the gallery slideshow
if (strtolower($this->slug) == 'forside') {
echo '<h4 style="text-align: center;"><span style="color: #ffcc00;">Nye utstillinger:</span></h4>
';
}
return true;
}
May be I study jQuery at a later point...
Thanks for help both of you
Last edited by post@trulsellefsen.no (2018-09-27 04:50:33)
Offline
Happy it works
Daniel Leu | Photography
DanielLeu.com
My digital playground (eg, Backlight tips&tricks): lab.DanielLeu.com
Offline