1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Creating the same table in every page

Discussion in 'Web Development & Web Hosting' started by simongrahamuk, Feb 19, 2006.

  1. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,199
    125
    199
    Firstly, I am not a Web Developer, so please don't go all complex on me!

    What I am tring to do is to create a website, but as Frames are frowned upon these days I am creating data in a Table. Now, what I would like to do is to have the same table, and its data, open up in every page within the site.

    Can someone advise as to how this can be done? Has it got anything to to with CSS? I'm really not grasping how this CSS stuff works if it has, so a step by step walk through would be appreciated.

    Thanks. :blink
     
  2. SimonV

    SimonV Petabyte Poster Administrator

    6,616
    149
    228
    I can point you in the right direction, one way would be to use Dynamic Web Templates.
     
    Certifications: MOS Master 2003, CompTIA A+, MCSA:M, MCSE
    WIP: Keeping CF Alive...
  3. d-Faktor
    Honorary Member

    d-Faktor R.I.P - gone but never forgotten.

    810
    0
    39
    simon,

    no, css has nothing to do with it. css is the technology to apply a skin, for lack of a better term, onto your bare html. css is pure layout.
    as for the table/data, do you use a cms of any kind, or perhaps you have your own custom dynamic php driven site? if not, then i assume you have a html file for each page, which would make what you want very difficult to implement, without resorting to frames. frames are not that frowned upon, as long they are used correctly and for the right reasons.
     
  4. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,199
    125
    199
    Cheers for the reply's guy's.

    I'll take a look at those Dynamic Web Templates, and if I can't get it to work then I'll just use the tables!

    D-faktor, this is simply a basic HTML page, no underlying server technologies.

    8)
     
  5. d-Faktor
    Honorary Member

    d-Faktor R.I.P - gone but never forgotten.

    810
    0
    39
    simon, if you're going to look at dynamic web templates, you'll end up working with those same underlying server technologies, like php or asp.

    but maybe i didn't understand the question.
    wait, let me rephrase that, after re-reading the question, and your subsequent answer, i >know< i don't understand it.

    in your original post you are contemplating between using a frame or a table, which are two inherently different things. and this data you're talking about, is it something you would normally put in an excel sheet, with rows and colums? if so, then tables are your friends. or is it not the data that you are worried about, but how the data looks? then css is your mate.
    however, if your problem is that you want to have this data (whether in a table or not) to appear on each and every page on your site, then you either put it in each and every html file (which will be a nightmare to maintain, especially when changes need to be made), or you use frames, or you go with something like php.

    the benefit of php (especially in combination with a database) is that you can ultracondense your site. you can serve thousands of pages with only a handful of actual files. while the learning curve can be steep, in the end your maintenance is low, because making changes that should be implemented on all of those thousands of pages, can be easily done with just a few edits here and there.
    or you use a cms (http://cmsmatrix.org/), which has a learning curve which is much less steep, and you get all the benefits of php, including low maintenance on your site. the downside is that you don't learn so much about html, css, or php. you learn to adjust your site to your cms and vice versa.

    while i still don't know exactly what you are trying to do, maybe i can still offer some help.

    if you have many html files, which all need to hold some data, again, don't put that data in all those html files. as i said, if you need to change something, then you need to edit all those html files again. if you don't want to use frames, you can still use php to your advantage, while still not going full steam ahead with a php/sql driven site engine.

    let's say your html files look like this.

    Code:
    <html>
    <body>
    
    ladida
    
    data
    
    ladida
    
    </body>
    </html>
    
    you can replace the data part like this:

    Code:
    <html>
    <body>
    
    ladida
    
    <?php include("datafile.php") ?>
    
    ladida
    
    </body>
    </html>
    
    and your datafile.php should then look like this:

    Code:
    <?php
    
    data
    
    ?>
    that way you can keep the data in just one file. if you ever need to change the data, just edit that one file and you're good to go.
    however, for this to work your site host should support php, and you need to rename your html files from filename1.html to filename1.php.
    (note: i keep referring to php, because that is the language that i'm most familiar with. there are of course other alternatives, like asp.)

    if this is still not what you're looking for, can you then give us an example of what you are trying to achieve?
     
  6. simongrahamuk
    Honorary Member

    simongrahamuk Hmmmmmmm?

    6,199
    125
    199
    Thanks for the help d-faktor. I should have really said exactly what I was wanting to to.

    It is part of an assignment for university.

    This is basicaly going to be a simple HTML website of about 10 -15 pages. Now, my initial idea was to split the site into two frames, a Menu frame (picture, logo, and navigation links), and a data frame (text and pictures). However, I was told that as frames are (aparently) frowned upon these days to use a table to split the content between pages.

    I have to admit that I couldn't grasp how this would work without posting the table and it's content into every page, hence me posting the original question.

    I've decided to use the Frames anyway, as this will be the easiest way to complete the task. If I loose marks, then so be it.

    I will also be having a discussion with the lecturer later this week to discover what he has thinking of!

    8)
     
  7. d-Faktor
    Honorary Member

    d-Faktor R.I.P - gone but never forgotten.

    810
    0
    39
    okay. i get it. just a few things, then i'll shut up. this is after all your assignment.

    frames are not frowned upon, but they do indeed have a bad rep, mainly because many of the sites that used frames sucked monkey balls. as such frames are not used that much anymore. but frames are still a valid method of composing documents together. the w3c even took frames to the next level and created the new xframes standard, for xml documents.

    keep in mind that frame is also an attribute of the table tag, dealing with the outer borders of a table.

    a table cannot be used to split/span content between pages. the purpose of a table is for structuring (mostly numeric) data, like this

    [​IMG]
     

Share This Page

Loading...