Active page highlight

Permalink Browser Info Environment
Hi - is there a way to automatically highlight a current link when it is on that page. I believe there is a part of the auto-nave that does this but can it be adapted to this block?

At the moment the accordion changes when you go a particular page and I have a long list of pages. I would like it to stay open and select or make bold the current page. Possible? Please let me know...

Type: Discussion
Status: Resolved
chassa2556
View Replies:
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
Hey,

I have added this feature into the back-end coding as because this add-on is a template and uses the original auto-nav block I'm unable to have an option for the feature :'(

It is simple to enable this, all you will need to do is go to your 'accordion_menu' package folder that will be within the 'packages' folder. You will then need to navigate through 'blocks/autonav/templates/' and then within here it will list the different colour themes.

You simply need to enter into your theme that you have activated and open up the 'javascript' file that will be called 'am_menu.js'.

Within this file at the bottom of the code you will see a line that looks like the following.
// \\ Removed comments '//' from the below to enable accordion to stick open when links area selected

Below that line there is 8 lines of code all including a // at the start of them.
You need to remove all the // from the start of these lines so it looks like the following....

var pathname = window.location.pathname;
var selecteda = $(".nav-selected a").attr("href");
// alert (selecteda)
// alert (pathname)
if ( selecteda == pathname ){
$('.nav-path-selected').parent().children().show();
$('#am_menu li ul li ul').addClass('am_deep_menu');
}


Once you have done this, just simply save the file and your required has been activated.

Regarding the highlighting of the selected page, this can be done by using CSS to change the colour or look of the active page.

The class of this is 'nav-path-selected'.

Hope the above helps :)
chassa2556 replied on at Permalink Reply
chassa2556
Hi - I've followed your instructions re. sticky menus but I can't for the life of me get it to work. It is highlighting the current page fine now but it the menu is not staying down when selected. I have uncommented the javascript as above.

http://redback-client.net/blbMain2/index.php/property-services/resi...

Any ideas what I'm doing wrong??
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
What version of C5 are you using?
chassa2556 replied on at Permalink Reply
chassa2556
I'm using the latest version 5.4.1
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
Ok, I think there may be a little horrible bug. Ill sort this and let you know when it has been updated :D

Appologies
chassa2556 replied on at Permalink Reply
chassa2556
Thanks for that - hopefully it won't be too long as I know the client is going to request it...
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
Hey,

I've updated the version to 'Accordion Menu 1.4'. If you upgrade to that and let me know the outcome :D

Thanks,
Chris
chassa2556 replied on at Permalink Reply
chassa2556
sorry to be dim but how do I do that. If I go to my profile where I can download it it is still the earlier version...
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
If you go to your dashboard and then 'Add Functionality' it will give you the option to update any add-ons that have updates in there.

Good luck!

P.S - Upgrading an add-on will overwrite any customizations that have been made to the add-on!!
ChrisWatterston replied on at Permalink Reply
ChrisWatterston
Hey,

I have found a bug within the way the 'accordion menu' uses concrete5 link
listing when used deep inside site maps to choose whether or not to keep
the menu open and I'm working on fixing this for you.
I will let you know when this has been updated :) APPOLOGIES

Thanks & please write back soon or I’ll cry,
Chris Watterston
chassa2556 replied on at Permalink Reply
chassa2556
Arrrr I had a feeling it could be something to do with this. I think it would be an important fix to make as I can see a lot of people using this as a secondary vertical nav and thus using (as I am) child folders within the sitemap.

Look forward to hearing thanks for persevering Chris.
ChrisWatterston replied on at Permalink Reply 1 Attachment
ChrisWatterston
I have managed to fix this for you, if you replace the am_menu.js with the attached this should sort you out so things work perfectly for you :)

let me know how it goes, sorry for the delay :'(

Cheers,
Chris
chassa2556 replied on at Permalink Reply
chassa2556
Working now well done - thanks Chris

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.