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.
Hi Rod
Site: http://martine-cheval.be
Maybe did you notice that I had implemented "Highlighting the current page’s navigation menu item" using yout Tip.
I really think this is a great "plus" to navigation, especially when entering a site from Full screen flip gallery. Thanks a lot for this tip.
Just for information: in the phplugins.php file, in CE4, the line <link href="/phplugins/css/custom.css" rel="stylesheet" />
is sligntly different:" link href" has been replaced by "link ref" and it is enouth for prevent the script for working. Just replaced ref by href and it works.
An other point is that Hightlighting doesn't work for the "Oeuvres récentes" page whitch is a Stage page.
Cordially
fredy
Last edited by fwillette (2014-08-20 18:50:32)
http://www.martine-cheval.be/
Lightroom CC2015
Offline
it's still <link ... href ... in the phplugins file generated by CE4
this is what I see:
<link rel="stylesheet" href="/phplugins/css/custom.css" />
Not sure why that particular page isn't being highlighted in menu. The only real difference I see in your navigation for that item compared to the others is that it doesn't have a / at the end of the url. Try adding that. If that doesn't work, try /index.php
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Rod
Stage page "oeuvres récentes" is now hightlighted, I added a "/" at the end of the URL, seems that the syntax is different for pages ceated by TTG-Pages that are of type" /page.php" and supplementary pages ( like Search or Stage ) that are of type "/url/"
Concerning the code line ( 136 or 137 ) beneath which code must be inserted to activate hightlighting, in your Tip, you mention this line:
<link href="/phplugins/css/custom.css" rel="stylesheet" /> and I think it was the case with CE3, but with CE4 this line is now:
<link rel="stylesheet" href="/phplugins/css/custom.css" /> In this case hightlighting is not active. To acitivate, must be changed in
<link hrel="stylesheet" href="/phplugins/css/custom.css" /> I just tested it now to confirm.
Thanks for all
Fredy
http://www.martine-cheval.be/
Lightroom CC2015
Offline
seems that the syntax is different for pages
I'm guessing it's rather how the code returns window.location.href. I still have a whole lot to learn....
hrel is not valid html
the code, as it appears in the tutorial is working fine in my CE test site: http://ce4.barbeephoto.com/
This is what I have in my phplugins file:
function ttg_head_end( $style, $path ) {
echo '
<link rel="stylesheet" href="/phplugins/css/custom.css" />
<script>
$(document).ready(function() {
$("#navigation a").each(function() {
if ($(this).prop("href") == window.location.href) {
$(this).addClass("selected");
}
});
});
</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
Oh, and thanks for pointing out how this wasn't working on a couple of pages. I've updated the tutorial to point out that urls targeting a folder need to end in a forward slash.
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline
Hi Rod
I pasted the code you gave in post 4 above and it works.
This is the code I use:
function ttg_head_end( $style, $path ) {
echo '
<link href="/phplugins/css/custom.css" rel="stylesheet" />
<script>
$(document).ready(function() {
$("#navigation a").each(function() {
if ($(this).prop("href") == window.location.href) {
$(this).addClass("selected");
}
});
});
</script>
';
and it works too.
I don't really remember what was the initial issue, but the most important is that it works.
Thanks
Fredy
http://www.martine-cheval.be/
Lightroom CC2015
Offline
probably just a simple syntax error: a missing ' or misplaced ;
Rod
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight 2/3 test site
Offline