SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict
    Join Date
    Sep 2007
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thoughts on using includes in web page

    Hi,

    I have come across info about attaching a navigation menu as a php Include to your page so that it is easier to make changes to multiple pages on your site at one time. I have never worked with includes before but certainly like this concept. I was wondering what the pros and cons are to using them?

    Do they load quickly, or is it one of those sites where everything else loads first and then the navigation pops in last? Well not last, but not right off the bat either.

    I'm a little nervous about implementing this. Would like some advice before pursuing ...

    Thanks,
    Sarb

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,590
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Hi Sarb. I'd say there is no downside to using includes for menus etc. It's essential. The basic rule is not to repeat yourself. I find includes load straight away with no perceivable delay.

    Here's a basic guide to using includes that may be of use:
    http://pageaffairs.com/web/php/enhan...-php-includes/

  3. #3
    SitePoint Addict
    Join Date
    Sep 2007
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am a convert. Thank you for the link and the advice. I couldn't believe how simple it was to do. I know very little php, so was a little hesitant. Not any more...

    Thanks,
    Sarb

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    23,590
    Mentioned
    411 Post(s)
    Tagged
    6 Thread(s)
    Great, I'm glad that helped. I really love includes, so glad you have caught the bug.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •