WEB Is it possible to make a webpage like this?

Discussion in 'OT Technology' started by Falconer, Nov 3, 2008.

  1. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Ok here's a rough illustration that hopefully explains what I'm looking to do.

    Can you have separate .html(?) files that load in separate places on your page? So say you have the header, which contains a logo, some links, info, etc. and you want that to load on every page on your site, so you just make it its own thing that loads separately.

    Then you've got the unique content per page, which will obviously differ per page, so that becomes like a regular page.

    Then on the side you've got panels for navigation, or ads, or bio info, or whatever, and you want those to be *updateable* across all pages at once. So you want them to be their own objects that load on each page, so when it comes time to update it, you just update one file and then the changes are loaded globally on all your pages, rather than having it have to be changed manually on each page, which could get tedious if you have 100s of pages on your site. Kind of like how if you change the source of an image, it changes across your website everywhere it is loaded; I want html on parts of my page to be able to be changed globally like that.

    So is this possible, and how?

    [​IMG]
     
  2. Tony Stark

    Tony Stark John McCain has an illegitimate mexican baby

    Joined:
    Jun 27, 2003
    Messages:
    40,060
    Likes Received:
    0
    iframes
     
  3. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    tell me more. I was reading somewhere else that iframes aren't good to use cuz google bots miss them or something
     
  4. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    :rofl:?
     
  5. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    i'd use an object tag or server side include
     
  6. JoeyJoJoJuniorShabadoo

    JoeyJoJoJuniorShabadoo Live Free or Die

    Joined:
    Nov 9, 2004
    Messages:
    4,347
    Likes Received:
    0
    Location:
    http://www.stogietime.com
  7. LOLZILLA

    LOLZILLA New Member

    Joined:
    Jul 11, 2004
    Messages:
    97,923
    Likes Received:
    0
    Yes, it's called php.
     
  8. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    so as a complete noob where would I go to learn how to do that with php?
     
  9. Die Antwoord

    Die Antwoord New Member

    Joined:
    Nov 5, 2007
    Messages:
    7,913
    Likes Received:
    0
    Location:
    Orlando, FL
    frames ftl
     
  10. hurleyint1386

    hurleyint1386 Someone has sand in their vagina

    Joined:
    Jan 6, 2005
    Messages:
    3,687
    Likes Received:
    0
    Location:
    Rochester, NY
  11. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Hmm.

    Is it possible to see the code of a website that's set up that way or would the code be hidden on the server side?
     
  12. Ricky

    Ricky █▄ █▄█ █▄ ▀█▄

    Joined:
    Jun 17, 2005
    Messages:
    38,767
    Likes Received:
    6
    hidden server side

    itll be something like

    <?php
    include 'whatever.html';
    ?>
     
  13. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    So is each sectional .html file placed in a table cell, or a CSS division? How do they do it?
     
  14. pkr

    pkr Guest

    ssi? as it's been some(what) mentioned
     
  15. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
  16. Major Tom

    Major Tom OT Supporter

    Joined:
    Mar 10, 2003
    Messages:
    5,683
    Likes Received:
    0
    Location:
    England
    There are loads of ways to do it - iframes is probably the easiest if you're a noob, but not the best.

    SSI is very easy too, if you don't fancy php.
     
  17. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    what is ssi? I've never heard of that. Is it pretty easy?

    I was all set to do my site in normal html until I realized that with many pages it would take FOREVER to manually update the same menu in each one, so I figured there has to be some way to do it globally that even a noob like me can understand.
     
  18. Major Tom

    Major Tom OT Supporter

    Joined:
    Mar 10, 2003
    Messages:
    5,683
    Likes Received:
    0
    Location:
    England
  19. kilamasta

    kilamasta New Member

    Joined:
    Aug 14, 2006
    Messages:
    108
    Likes Received:
    0
    Yes you do that with PHP. I have a template for all my website. I have setup an example for you here : http://alacor.awardspace.com/

    The page contains nothing but if you click on the menu, you will see that the basic frame of the page always stays the same, and most of my pages contains only few lines of codes.

    If you look at the title of each page, you will see "SITE TITLE - XXXXXXXX". If i want to change "SITE TITLE" in everypage, i just have to change "header.php" once. ( The xxxxxx is customed for each page)

     
  20. kilamasta

    kilamasta New Member

    Joined:
    Aug 14, 2006
    Messages:
    108
    Likes Received:
    0
    Actually the following example might be better for your needs:

    http://alacor.awardspace.com/sidemenu/index.php

    If you don't want to learn php ( you should), you could do massive search & replace in all of your html files all at the same time.

    Search :"a href="image/HEADER.JPG"
    Replace "a href="image/NEW_HEADER.JPG"

    Although in that example you could just change header.jpg altogether :mamoru:
     
  21. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Ok in that example, say I want to have that second area (where you have " Text sans but précis~~~~~~~~~~~~~~~~~~pour l'instant" written) on every page, but then at some point in the future I want to change that section on every page just by updating one file. How do I do that?
     
  22. kilamasta

    kilamasta New Member

    Joined:
    Aug 14, 2006
    Messages:
    108
    Likes Received:
    0
    Well in my case, that section is one file called "footer.php". I would just change that single file and every page would get the change. I am gonna do it right now ^^

    These are the source files I used for that site (open in any text editing software)
    http://www.upload.ws/download-6329491.html

    Most of the content in the source file is french, but you should not have any problem figuring it out.
     
    Last edited: Nov 3, 2008
  23. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Ok I'm getting confused now cuz when I view the source for that page I see this:

    Code:
    <p class="center">
    Here is my new footer. I will be changed in all file.
    Copyright Me, stupid plagiarism
    </p>
    So it looks to me like that text is hardcoded into the page and not being referenced in another file.

    What am i missing?
     
  24. kilamasta

    kilamasta New Member

    Joined:
    Aug 14, 2006
    Messages:
    108
    Likes Received:
    0
    This because this is PHP : the command I give the server is

    "Take header.php,
    append (whatever page, index,product, shopping cart, etc)
    append footer.php
    and generate a one time only HTML for the user"

    Header.php
    Index.php
    Footer.php
     
    Last edited: Nov 3, 2008
  25. Falconer

    Falconer OT Supporter

    Joined:
    Jun 23, 2006
    Messages:
    65,506
    Likes Received:
    1
    Ohh!! So what I was expecting to see is actually happening behind the scenes, and it's putting the actual output directly into the html.

    Got it. Thanks.

    I will have to play around with this now.

    Thanks :bowdown:
     

Share This Page