WEB help on page design

Discussion in 'OT Technology' started by lightsareout, Jan 17, 2008.

  1. lightsareout

    lightsareout New Member

    Joined:
    Aug 19, 2006
    Messages:
    5,913
    Likes Received:
    0
    Location:
    Murfreesboro, TN
    I've always wondered how to do this and any help on the matter would be awesome.

    say you create a page as your template with text links of "home" "bio" "contact" (simple yes but an example). And make 50 pages for your site from this template. How do you design your template so that you can later add or remove text links without having to edit every page you created? CSS, Javascript???
     
  2. Mangos

    Mangos New Member

    Joined:
    Jul 10, 2005
    Messages:
    6,610
    Likes Received:
    0
    Location:
    Boston, MA
    what you can simply do is use php, and include that section in a separate file

    ex: put all your menu code into menu.php

    then in that section of index.php do <? include 'menu.php' ?>

    that way, you only have to edit one file.

    if you want to get advanced, you can also use SQL
     
  3. lightsareout

    lightsareout New Member

    Joined:
    Aug 19, 2006
    Messages:
    5,913
    Likes Received:
    0
    Location:
    Murfreesboro, TN
    thats kind of what i was thinking, are they're any good EDUs on doing this out there?
     
  4. whomadewho

    whomadewho Ohhh FCN Ohhhhh FCN!

    Joined:
    Jan 10, 2002
    Messages:
    20,235
    Likes Received:
    0
    Location:
    San Francisco
    u can also use the template feature in dreamweaver, if you have it. it's a bit old school but works great
     
  5. LyFeWoRx

    LyFeWoRx 2 + 2 = 4 OT Supporter

    Joined:
    Jul 17, 2006
    Messages:
    120
    Likes Received:
    0
    Location:
    New York, New York
    it's really easy to use php. Just create a new file called menu.php build your menu in html if you prefer. then in the index.php and all your other 50 files insert the include menu.php code and the menu will show up on all the pages.

    From now on you only have to edit menu.php and it will change on every page.
     
  6. dawgboye

    dawgboye I'm a businessman who's commodity happens to be co

    Joined:
    Jan 16, 2006
    Messages:
    7,971
    Likes Received:
    0
    Location:
    A Smart Part of Town.
    If you aren't using PHP, you can do this with a simple server side include. It is the same concept as the PHP, but without the necessity to have PHP installed or know how to code PHP.

    You simply code your header menu, and then create a text file with that in it. On the page, you use this call:

    <!--#include file="includes/headermenu.txt" -->


    You can build your entire page this way if you want to only have to edit a few things when making changes. So you can do the same thing with your footer menu, etc. When I do such things, I create a directory for the includes, name them intuitively, and then just call them where I need them.

    You need to make sure you save your HTML pages as .shtml and that your webserver allows SSIs.
     
  7. crazybenf

    crazybenf Active Member

    Joined:
    Nov 14, 2001
    Messages:
    15,575
    Likes Received:
    2
    Oldschool, son. :coold:
     
  8. LOLZILLA

    LOLZILLA New Member

    Joined:
    Jul 11, 2004
    Messages:
    97,923
    Likes Received:
    0
    php/

    I just did that to a site. :o
     

Share This Page