Any way to have a container show the same info on all pages?

Discussion in 'CSS' started by gpucci, May 29, 2008.

  1. #1
    I have a website devoted to the NBA draft (it's a mock draft web site). Anyhow, I just bit the bullet and went from a full HTML page to mostly a CSS page. Learning it was a blast although I am still a novice.

    I have a question though... In one of my containers I have a list of my site updates, and the links to that area. What I want to do is when I put the update dates in there I want them to show on all 100+ pages so I don't have to change each one manually. That's the reason I did CSS so it was easier. Believe me it is, but that one aspect I have problems with.

    Anyone help? :) Thanks!
     
    gpucci, May 29, 2008 IP
  2. qube99

    qube99 Peon

    Messages:
    75
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Take a look at the iframe container. Sounds like what you need.

    iframe
     
    qube99, May 29, 2008 IP
  3. gpucci

    gpucci Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hrmm.. Not sure..

    This is my site..
    nbamock.com

    On the top right you will see "site updates" That's the box I want to update only once and show on all pages in the same spot.

    Bear in mind I am not changing any of the 2008 profiles because the NBA draft is in like a couple weeks, and didn't want to do all the work for about 100 players for something that's going to be history in a couple weeks :)

    But anyhow, that's the box I wanted to update once, but show on all pages.
     
    gpucci, May 29, 2008 IP
  4. Jorge05r

    Jorge05r Active Member

    Messages:
    303
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #4
    The simplest way would be the following, you would have to change from .html to .php all pages:


    1.Create the main page structure (index.php)

    2.The rest would be to create each section as .html pages as you see on the index.php ("head.html" , "menu.html", "body.html"), right_menu.html, "footer.html"), you may separate each section as you may prefer.

    I hope this helps
     
    Jorge05r, May 29, 2008 IP
  5. gpucci

    gpucci Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Like frames used to be? I remember doing a page a long time ago where I had a frame on one end where the menu was which wouldn't change at all.

    I get it.. thanks a lot! :) Totally forgot about that idea.
     
    gpucci, May 29, 2008 IP
  6. Boulder

    Boulder Well-Known Member

    Messages:
    806
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    118
    #6
    Yep Jorge05r is right!

    using php and php pages is the best way to do that..

    Than make one php file with your block of changing dates and use a php include to include that block where you want it in the pages.. Once you have the pages set up, all you will need to change is the one file when you make updates and it will show on all pages.

    Boulder
     
    Boulder, May 29, 2008 IP
  7. Normac

    Normac Peon

    Messages:
    40
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Don't forget that if you have named all of your files .html, change your .htaccess file so PHP code can work on .html, else you will have to change all the files to .php, then change every link: Not fun.
     
    Normac, May 30, 2008 IP