www.webdeveloper.com
Results 1 to 5 of 5

Thread: Changing HTML page structure - php?

  1. #1
    Join Date
    Oct 2005
    Posts
    8

    Changing HTML page structure - php?

    Hi. I'm working on this page where the main manu is on the left and the content on the right. the problem is that there are hundreds of pages of content and the left menu is quite limited and needs a bit expanding. of course there are submenus on the content pages. i connot change the look of the website. all pages are html only. there are some bits with js.

    i would like to have the left menu as a seperate file which i could easily modify without having to modify it on all the pages. i know that i can use the include command in php, but i need more advise on how to do that successfully.

    getting rid of this menu on the left will also help in se ranking for robots will parse the code and get to the content much quicker.

    i would also like footer as a seperate file. any help will be appreciated. thanks

  2. #2
    Join Date
    Oct 2004
    Location
    The very depths of programming hell
    Posts
    828
    It's hard to understand exactly what you mean without seeing some code... have you tried using framesets in html?

  3. #3
    Join Date
    Jul 2005
    Posts
    49
    take this for example
    full.html is kinda template
    full.html
    Code:
    <html>
    <body>
    <table width="100%">
    <tr><td colspan="3" width="100%">header here </td>
    </tr>
    <tr valign="top">
    <td width="12%" valign="top"> Column Left</td>
    <td width="86%">Body Area</td>
    <td width="12%" valign="top">Column Right</td>
    </tr>
    <tr><td colspan="3" width="100%">Footer here</td>
    </tr>
    </table>
    page_top.php
    Code:
    <html>
    <body>
    <table width="100%">
    <tr><td colspan="3" width="100%"><?php require "header.php"; ?></td>
    </tr>
    <tr valign="top">
    <td width="12%" valign="top"><?php require "column_left.php"; ?></td>
    <td width="86%">
    page_bottom.php
    Code:
    </td>
    <td width="12%" valign="top"><?php require "column_right.php"; ?></td>
    </tr>
    <tr><td colspan="3" width="100%"><?php require "footer.php"; ?></td>
    </tr>
    </table>
    column_right.php
    Code:
    <table width="100%">
    <tr>
    <td>This is Column Right</td>
    </tr>
    <tr><td>Menu Item 1</td>
    </tr>
    <tr><td>Menu Item 2</td>
    </tr>
    <tr><td>Menu Item 3</td>
    </tr>
    </table>
    column_left.php
    Code:
    <table width="100%">
    <tr>
    <td>This is Left Column</td>
    </tr>
    <tr><td>Menu Item 1</td>
    </tr>
    <tr><td>Menu Item 2</td>
    </tr>
    <tr><td>Menu Item 3</td>
    </tr>
    </table>
    header.php
    Code:
    <table width="100%">
    <tr>
    <td>This is Herader</td>
    </tr>
    </table>

    footer.php
    Code:
    <table width="100%">
    <tr>
    <td>This is footer</td>
    </tr>
    <tr><td>footer Page has its own table</td>
    </tr>
    </table>
    index.php
    Code:
    <?php require "page_top.php"; ?>
    <table width="100%">
    <tr>
    <td>This is index page</td>
    </tr>
    <tr><td>Index Page has its own table</td>
    </tr>
    </table>
    <?php require "page_bottom.php"; ?>
    newsletter.php
    Code:
    <?php require "page_top.php"; ?>
    <table width="100%">
    <tr>
    <td colspan="2">Plesase Login here</td>
    </tr>
    <form action="nowhere.php">
    <tr>
    <td>Enter Email</td>
    <td><input name="email"></td>
    
    </tr>
    <tr><td colspan="2" align="center"><input type="submit"></td>
    </tr>
    </form>
    </table>
    <?php require "page_bottom.php"; ?>
    newsletter.php and index.php are the main pages
    others are just included
    i think ull figure out rest
    or ill explain later :P
    Last edited by emin3m; 10-05-2005 at 11:40 AM.

  4. #4
    Join Date
    Oct 2004
    Location
    The very depths of programming hell
    Posts
    828
    Wow... someone has a lot of free time

  5. #5
    Join Date
    Jul 2005
    Posts
    49
    Quote Originally Posted by agent_x91
    Wow... someone has a lot of free time
    lol am in office

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles