 |

johnlynch
User
Nov 28, 2006, 12:06 PM
Post #1 of 11
(624 views)
Shortcut
|
|
Highlight current category in navigation
|
Can't Post
|
|
Hi, nearly finished this job... and loving article manager! Just wondering, I'm using categoryHeadlines for a navigation bar. How would one go about making a table cell change background color to indicate which particular category you are browsing? My url is: http://www.bonsecoursireland.org/artman2/publish/index.asp Thanks, John.
|
|
|  |
 |

dbramley
User
Nov 29, 2006, 10:17 AM
Post #2 of 11
(614 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
I think Article Manager does this by default out of the box. Probably easiest way is to view the code for the original page and take a look how they have done it. Its something like this: [templateIf : $isSelectedCategory$ == '1'] class="selected_category"[/templateIf] - you would put this into the cell of your category row <td> and change the class to whatever you want from your stylesheet.
Stockton on Tees | Hartlepool | Middlesbrough | Sunderland
|
|
|  |
 |

ross
Staff
/ Moderator

Nov 29, 2006, 5:19 PM
Post #3 of 11
(605 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Hi John. Thanks for posting and welcome to the board! As dbramley mentioned (thanks by the way ), the category you are in actually highlights itself by default. Of course, you have customized things a bit but you should still be able to get it going. What I was thinking is if you were to post up your template, I could have a closer look at what's going on and see if I can get some suggestions on how to get things going again . ----------------------------------------------------------- Cheers, Ross Fairbairn - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

johnlynch
User
Dec 5, 2006, 2:01 AM
Post #4 of 11
(585 views)
Shortcut
|
|
Re: [ross] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Brilliant, I must've broke it in my earlier hack - was learning as I went :-/ Here's the code for my categoryMenu.html: <!-- templateComment --><link href="../singlePages/styleSheet.css" rel="stylesheet" type="text/css" /><!-- /templateComment --> <!-- <td class="hmenuender"><img class="left" src="$_weburl$images/navcorner.gif" alt="spacer" /></td> --> <td class="hmenu_home"><a class="hmenu_home" href="http://www.bonsecoursireland.org/artman2/publish/index.asp">Home</a></td> <!-- template insert : $categoryList$ --> <!-- templatecell : categoryRow --> <td class="hmenu"><a class="hmenu" href="$published.categoryIndex.url$">$category.name$</a></td> <!-- /templatecell : categoryRow --> <!-- templateIf : $categoryList$ eq "" --> No categories found. <!-- /templateIf --> I'll have to implement it elsewhere on the site but if I find out how to do it here I'm sure I'll be able to apply it across the board. Thanks again :-)
|
|
|  |
 |

ChetW
Staff

Dec 6, 2006, 1:14 PM
Post #5 of 11
(572 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Hi John, Thanks for the follow-up! It's good to hear that you got this working, and thank you for posting the code that you used. I am sure that other people in the community will find it useful. :) Cheers, Chet Woodside - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

johnlynch
User
Dec 6, 2006, 2:21 PM
Post #6 of 11
(570 views)
Shortcut
|
|
Re: [ChetW] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
I'm sorry you got the wrong impression - the code above DOESN'T work, I posted it in the hopes that someone would let me know what was missing! If someone can halp me out then I'll hopefully be able to apply it across the site.
|
|
|  |
 |

Donna
Staff
/ Moderator

Dec 7, 2006, 4:14 PM
Post #7 of 11
(556 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Hi John! Take a look at the default code for category menus:
<!-- template insert : $categoryList$ --> <!-- templatecell : categoryRow --> <tr[templateIf : $isSelectedCategory$ == '1'] class="selected_category"[/templateIf]> <td class="categoryDepth$category.depth$"> <a href="$published.categoryIndex.url$">$category.name$</a> </td> </tr> <!-- /templatecell : categoryRow -->
As you can see, there's a "template if" statement in there that changes the class if the category is selected. You can modify this to fit however you'd like so that your selected categories are formatted to meet your needs. :) Let me know if that helps, or if you have any other questions or concerns! Donna
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

johnlynch
User
Dec 8, 2006, 3:40 AM
Post #8 of 11
(543 views)
Shortcut
|
|
Re: [Donna] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Hi Donna, That makes perfect sense, but for some reason the $isSelectedCategory$ remains 0 even when it should be 1 (i.e. when a category is selected). Is there somewhere that this can be turned on and off? Perhaps I've turned it off somewhere?
|
|
|  |
 |

ChetW
Staff

Dec 9, 2006, 1:44 PM
Post #9 of 11
(533 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
Hi John, Thanks for the follow-up! That's a little odd, if you like I will be happy to take a closer look at you template files. All you will need to do is fill in a support request with yor ftp details, once I can connect with your server I will be happy to take a closer look at what may be happening here. :) Does this help John? If you have any other questions please feel free to ask! Cheers, Chet Woodside - Product Specialist support@interactivetools.com
Hire me! Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.
|
|
|  |
 |

floodrod
User
Dec 12, 2006, 10:46 AM
Post #10 of 11
(489 views)
Shortcut
|
|
Re: [johnlynch] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
I had the same problem, After beating my head into my computer desk for 3 hours with, I finally got it to highlight. When I revamped my templates originally, I made the global index how I wanted, than cloned the same page, changed the variables, and saved it as the category index. The mistake was not changing the variables: <!--#include virtual="$published.categoryMenu.webpath$" --> and <!--#include virtual="$published.globalMenu.webpath$" --> On both my global index and category index I had <!--#include virtual="$published.globalMenu.webpath$" --> Global Index is programmed not to highlight, but will display the categories normally, So it's easy to miss. This may not be your problem, but could definitely be a valid explaination
|
|
|  |
 |

johnlynch
User
Dec 12, 2006, 3:15 PM
Post #11 of 11
(483 views)
Shortcut
|
|
Re: [floodrod] Highlight current category in navigation
[In reply to]
|
Can't Post
|
|
You, my friend, are an absolute legend! Thanks for that - it was making me lose sleep! I finish the job tomorrow :-) Thanks again, John L.
|
|
|  |
|