1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

editing every single page!

Discussion in 'HTML & Website Design' started by Semir, Jul 10, 2008.

  1. #1
    Hi, I was wondering if anyone could help me with this. I can design websites, and code them in xhtml and css. Now lets say I have a two column site. One the second column lets say I have partner links. Now if I want to edit those partner links, I have to go through each and every individual page and do it. Its boring and time consuming. Is there a better way to this?
     
    Semir, Jul 10, 2008 IP
  2. Unreal

    Unreal Peon

    Messages:
    77
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Something like
    
    <?php include("filename.php"); ?>
    
    PHP:
    might work.

    That way you can make a file for the links, then edit that one file to edit it on every page.
     
    Unreal, Jul 10, 2008 IP
  3. therearentanynamesleft

    therearentanynamesleft Peon

    Messages:
    47
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    my only suggestion is use php and then implement the 'php include' function.....

    haha we posted at the same time
     
    therearentanynamesleft, Jul 10, 2008 IP
  4. Divisive Cottonwood

    Divisive Cottonwood Peon

    Messages:
    1,674
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Use a CMS! No editing individual pages then...
     
    Divisive Cottonwood, Jul 10, 2008 IP
  5. Semir

    Semir Peon

    Messages:
    202
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    php might work, thanks guys.
     
    Semir, Jul 11, 2008 IP
  6. therearentanynamesleft

    therearentanynamesleft Peon

    Messages:
    47
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    if you are new to php, you should know that you can take your current .html files and rename them to .php, then add php tags (<?PHP include('url'); ?>)
     
    therearentanynamesleft, Jul 11, 2008 IP
  7. ssdesignstudio

    ssdesignstudio Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I definitely recommend PHP like the above. I remember being in the same boat and that's why I got into PHP to begin with.

    However, if you are looking for a CMS, then Joomla or Mambo are pretty good ones.
     
    ssdesignstudio, Jul 11, 2008 IP
  8. riftshighway

    riftshighway Active Member

    Messages:
    368
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    60
    #8
    Hand coding is relatively dead. Useful to know, but dead.

    Learn a CMS.
     
    riftshighway, Jul 11, 2008 IP
  9. jimpossible2k

    jimpossible2k Active Member

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #9
    You need to learn how to build websites using some kind of "architecture". By architecture, I mean that there has to be some structure to how your pages are developed/generated/displayed etc ... . For example, when I design webpages, I have the header, footer, left/right navigation (ie: things that tend to stay the same across many web pages) defined in separate files. Then you can make an individual page file for the unique content of a particular page. When a change needs to be made to the header, footer, or left/right navigation of a page, you just have to change one file. I also define important constants in a separate file (ie: MAX_USERNAME_LENGTH) which I can then refer to in each individual page. This enables me to change values across all pages by just changing the constant value in the file containing the constants.
     
    jimpossible2k, Jul 11, 2008 IP
  10. ukesh

    ukesh Peon

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    if u want to keep ext.in html u can wrok in template system of dreamweaver {DWT}
     
    ukesh, Jul 12, 2008 IP
  11. kentuckyslone

    kentuckyslone Notable Member

    Messages:
    4,371
    Likes Received:
    367
    Best Answers:
    0
    Trophy Points:
    205
    #11
    Using php includes is definitely the way to go. You can create a separate file for each common part of your site (header, footer, navlinks etc) and call them up on the pages using the method Unreal gave above. Then when you want to change something you only have one file to change.

    Using php includes along with an external CSS stylesheet can make your job much easier.

    Unfortunately, changing all your files to .php can be a hassle so it is best to start using this method from the beginning.
     
    kentuckyslone, Jul 12, 2008 IP
  12. rebelagent

    rebelagent Well-Known Member

    Messages:
    876
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    165
    #12
    As previously stated use PHP includes function and learn to structure your website.

    What I do is create a new page and call it anything I want. In your case I'd call it partnerlinks.inc (or .php, .html, .txt, .htm it's up to you). I'd place that in a file called Content or Includes.

    On my actual page such as index.php my coding would look like this
    <html>
    <head>
    <title>Home</title>
    'CSS Code here'
    </head>
    <body>
    <div>
    <?php include ('includes/header.php'); ?>
    </div><div>
    <include ('includes/menu.inc'); ?></div>
    <table>
    <tr>
    <td>
    <?php include ('includes/content.inc'); ?>
    </td><td>
    <?php include ('includes/partnerlinks.inc'); ?>
    </td>
    </tr>
    </table>
    <div class="footer">
    <?php include ('includes/footer.inc'); ?>
    </div>
    </body>
    </html>

    I do everything with includes. So I can just edit the basic content of each page.

    I also organize it like this
    index.php (only files changed are content.inc)
    order.php (only files changed are order.inc)
    contact.php (replaced main content area with php form code but I could also do an include here as well)

    So if anything ever changes you don't have to worry about screwing up your code.
     
    rebelagent, Jul 13, 2008 IP
    kentuckyslone likes this.