xhtml site template question

Discussion in 'HTML & Website Design' started by fuzzbuzz, Apr 22, 2008.

  1. #1
    How can i update the menu nav on all pages of an xhtml site when i update the nav on the index?

    Is it using editable regions? Or is there another way?

    thanks

    fuzz
     
    fuzzbuzz, Apr 22, 2008 IP
  2. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can use a PHP include whereby where the menu would usually go you would have:
    <?php include("menu.php"); ?>
    Then you would have a file called menu.php where the menu would lie. Then when you update the menu it would update on all pages inside the site. However this requires you to save your page as a .php rather than .html.
     
    wd_2k6, Apr 22, 2008 IP
  3. Ascendancy

    Ascendancy Active Member

    Messages:
    1,721
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    90
    #3
    If you don't use PHP, there is a way to do this with all backend languages: ASP, ColdFusion, Perl, Java, etc... However, if you really don't want to use and backend and want to keep your .html extension, then you can use a server-side include run through Apache(if that's your server type). Try Googling it if you are interested, since it's a little complicated to explain.
     
    Ascendancy, Apr 22, 2008 IP
  4. wd_2k6

    wd_2k6 Peon

    Messages:
    1,740
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Are there any disadvantages to having a "php" extension rather than a "HTML" extension?
     
    wd_2k6, Apr 22, 2008 IP
  5. Ascendancy

    Ascendancy Active Member

    Messages:
    1,721
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    90
    #5
    Are you asking me or the OP? Me, I can't really see any disadvantage or advantage, but it's not my site :)
     
    Ascendancy, Apr 22, 2008 IP
  6. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    436
    Best Answers:
    0
    Trophy Points:
    0
    #6
    No, there is no disadvantage (when having Apache treat .html files as PHP scripts).

    Anyway, the OP needs to read my post, PHP & Server-Side Includes.
     
    Dan Schulz, Apr 23, 2008 IP