Jump to content

Breadcrumbs + Active "Here" Link


chicobandito

Recommended Posts

Hello, I have 2 questions... :)

 

1. Do you know of any good and easy php breadcrumb solution?

 

2. I have recently learned how to use PHP to make a navigation Active based on what page I am on (see below).  If I am on the "currentPage" "contact.php" it will show it active...

But, what I also want to do is have the main nav active on a sub-nav page.  Is it possible to have 2 or more page referenced?  Something like ($currentPage == 'contact.php' AND 'contact_form.php')  Where both pages would make the link appear active and highlighted.

 

<ul>

<li><a href="contact.php" <?php if ($currentPage == 'contact.php') {echo 'id="here"';} ?>>Contact</a></li>

<li><a href="about.php" <?php if ($currentPage == 'about.php') {echo 'id="here"';} ?>>About Us</a></li>

<li><a href="careers.php" <?php if ($currentPage == 'careers.php') {echo 'id="here"';} ?>>Careers</a></li>

<li><a href="services.php" <?php if ($currentPage == 'services.php') {echo 'id="here"';} ?>>Services</a></li>

<li><a href="index.php" <?php if ($currentPage == 'index.php') {echo 'id="here"';} ?>>Home</a></li>

</ul>

 

Thank you in advance for your help :)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.