Page list highlight
Permalink 3 users found helpful
Hi all
I was wondering if there is a way to do this.
With Auto Nav, when you click on a page it will highlight the button to let you know that you are on that page. Page list does not do this and was wondering if there is an easy way to do it?
Or has anyone else created a solution?
Hope someone can help.
Cheers
Chris
I was wondering if there is a way to do this.
With Auto Nav, when you click on a page it will highlight the button to let you know that you are on that page. Page list does not do this and was wondering if there is an easy way to do it?
Or has anyone else created a solution?
Hope someone can help.
Cheers
Chris
Thanks red
Yeah I know how to implement it through CSS no problem. With the Auto Nav add-on it automatically adds a class to the link when you are on that page (using php code etc). The Page list add-on does not.
If I add a class to the page list it will add the class to all links.
Yeah I know how to implement it through CSS no problem. With the Auto Nav add-on it automatically adds a class to the link when you are on that page (using php code etc). The Page list add-on does not.
If I add a class to the page list it will add the class to all links.
Which add-on is that exactly, I looked for it but could not find in add-on.
Page list. It comes with C5.
Sorry should say Block not add-on.
Sorry should say Block not add-on.
Could you make a custom template for a page list? After creating the page list then you could choose to apply the custom template to it.
This is easily done with auto_nav so it seems like it work for the page list as well.
This is easily done with auto_nav so it seems like it work for the page list as well.
If I change the template that will change all the buttons will it not? Plus that will not go down with my client as they would not have a clue how to do this if they added pages. A lot of people will be updating the site within the company.
All I need is the same functionality as the Auto Nav block, with its auto highlight of the button when on the page, applied to the page list block.
Looking at the PHP of the page list block, it does not have the code to apply the auto highlight. Its built in a different way.
All I need is the same functionality as the Auto Nav block, with its auto highlight of the button when on the page, applied to the page list block.
Looking at the PHP of the page list block, it does not have the code to apply the auto highlight. Its built in a different way.
I'm trying to do the same thing here:
McKinleyArchitects.com
I'm using a variant of the page list block to display a number of portfolios with a line of description below them, and I'd love to be able to have the link for the current page highlight when you're on the page.
Has anyone gotten any further on a solution for this?
Thanks!
Ricky
McKinleyArchitects.com
I'm using a variant of the page list block to display a number of portfolios with a line of description below them, and I'd love to be able to have the link for the current page highlight when you're on the page.
Has anyone gotten any further on a solution for this?
Thanks!
Ricky
Attached is a modified version of the default page_list view. It adds a class called "active-page" to the <h3> element containing the page title.
To use, just drop the contents of the attached archive into the root blocks folder. Then, with the page containing your page_list block in edit mode, click the block, choose "Custom Template" and then select "Show Active Page" from the pop-up menu. Save and style as desired using CSS.
Basically, it just compares the collection ID of the page list item to that of the current page. If they're the same, it adds a class to the <h3> element.
Hope it helps,
-Steve
To use, just drop the contents of the attached archive into the root blocks folder. Then, with the page containing your page_list block in edit mode, click the block, choose "Custom Template" and then select "Show Active Page" from the pop-up menu. Save and style as desired using CSS.
Basically, it just compares the collection ID of the page list item to that of the current page. If they're the same, it adds a class to the <h3> element.
Hope it helps,
-Steve
Steve -
I'll check it out - I'm already using the Thumbview custom template to create roll-over thumbnails, but I'm thinking I'll be able to combine what I need to from both custom templates to make it work. I'll let you know how it pans out.
Thanks!
I'll check it out - I'm already using the Thumbview custom template to create roll-over thumbnails, but I'm thinking I'll be able to combine what I need to from both custom templates to make it work. I'll let you know how it pans out.
Thanks!
Here's the juicy bit in a nutshell...
-Steve
// Get current page $pg = Page::getCurrentPage(); $pgID = $pg->getCollectionID(); // In the loop, compare collection ID's if ($cobj->getCollectionID() == $pgID) { // This page list item is the current page. }
-Steve
Great feature!
Can be done via the stylesheet with something like this:
#menu li a.current, #menu li a.nav-selected {
color: #DBC48E;
}
you could use an image,background color or text color as I do.
Im sure there are other ways to get the same result,but this could be one.