Jump to content

Johnny4B

New Members
  • Posts

    3
  • Joined

  • Last visited

Johnny4B's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Johnny4B

    PHP Includes

    Thanks Ben .... I'll use the straight forward example as above ... but appreciate the heads up Regards John
  2. Johnny4B

    PHP Includes

    Wow, how the hell did I not think of that, just create separate classes for each page and assign them in the include .... I am almost ashamed to admit how long I have been building websites .... I put it down to the fact I was trying to do it using php, as opposed to just using the style sheet .... Sometimes the end goal is looking at you in the face, you just need someone to tell you Thanks John
  3. Johnny4B

    PHP Includes

    Hi Specifically joined to learn php, so starting with the basics and completed the first course last night, great course, and well reaffirmed the basics what I kind off knew, but one little issue with includes. How to handle navigation includes that have a html class associated to highlight that menu tab within the website itself For example, my menu has a class associated to the relevant page, so if I am on the index page, the <li> has a class "current menu item" - so on that webpage the home tab is a different colour to the other tabs, and so on for the about page, contact page etc. If I create an include file as indicated in the tutorial as I did here as shown below <li class="current-menu-item"><span class="menuslide"></span><a href="index.html" title="Home">Home<span class="menu_description">Beginning</span></a></li> <li><span class="menuslide"></span><a href="about.php" title="About">About<span class="menu_description">About</span></a></li> When the include is shown within the about page, the tab on the index page is still highlighted as the include is still calling the current menu item as the index page. Is there a way with a variable or another way someone might be able to let me know how to handle this Regards John
×
×
  • Create New...