How can I do this

Discussion in 'HTML & Website Design' started by wwe9112, Mar 4, 2008.

  1. #1
    How do i make it where i can edit one file and it'll edit all the pages...say i where to want a different layout, I'd place the layout in that file and it'll edit all the files to match the new layout. Also please give some details as im not good at this sort of thing. Remember I'm also kinda slow.
     
    wwe9112, Mar 4, 2008 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Templating system is about as close as you can get. Most of those will be in a server side scripting language like PHP. Smarty is one such templating system
     
    shallowink, Mar 4, 2008 IP
  3. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Whats a templating system?
     
    wwe9112, Mar 4, 2008 IP
  4. bluegrass special

    bluegrass special Peon

    Messages:
    790
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Server Side Include files (that's what they are called) and CSS are used to make changes across a site. Server side includes come from Perl and are supported by most of the web-scripting languages. Most Unix-based html servers support SSI if the sys admin has turned them on, but most do not. Most Windows servers will require ASP, PHP or the like.

    Usually a site that uses include files will have atleast two, one for the header (possibly with a left-hand menu-bar) and one for the footer (possibly with a right-hand menu-bar).

    Read up on SSI here.

    SSI is used to have code used on multiple pages, or update the logo across the site. CSS can be used to control formatting across the site (and much more as well).
     
    bluegrass special, Mar 4, 2008 IP
  5. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #5
    A template system allows you to define the layout of lots of pages through one template file.
     
    shallowink, Mar 4, 2008 IP
  6. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #6
    You could also use a header.php and a footer.php file. Basically instead of having all of your images and links called in in each page you just include('header.php'); that way if you ever want to change text links that are sitewide you don't have edit every single file. How many files do you currently have?
     
    PHPGator, Mar 4, 2008 IP
  7. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    None yet, it's for my uncles site, he changes his mind alot and I dont wana have to re code everything. lol...So do i have to learn a whole new system for this? I tried using php and it didn't work to well. I had to move everything into the directorys and such. (I hope that made sense like i had to move header footer left right content code into the directory so it would show up.
     
    wwe9112, Mar 4, 2008 IP
  8. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #8
    Well PHP would be a good choice. You can set it up so the changes are minimal. Little bit of a learning curve but if you have done include files, that's the basis of what you are after which is a template setup.
     
    shallowink, Mar 4, 2008 IP
  9. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I used php to get what i have up now...www.prowrestlingnow.com/uncle see there it is, and when u go to the game page everything is gone i had to remove the left cause of it was setting off everything else.
     
    wwe9112, Mar 4, 2008 IP
  10. bidder

    bidder Active Member

    Messages:
    431
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #10
    template in easy words is pre-made web page. layout, design,coloring is ready. just change accordingly what you need
     
    bidder, Mar 4, 2008 IP
  11. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    oops, sorry I gave you the wrong link it's www.prowrestlingnow.com/uncle/games/ sorry about that, see what happened when i took out the lft side, and when i had the left side in...everything was off balance
     
    wwe9112, Mar 5, 2008 IP
  12. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Depending on how much he changes his mind and with what, you might be able to get away with simply CSS. If you have a robust CSS page layout, you can move stuff around pretty easily (the left sidebar now has to be a right sidebar? No problem) and changing text is also usually not a huge deal.

    The templating/SSI thing is more like, your uncle has a 30-page website and THEN he changes his mind on the HTML. If he changes his mind about which side has the sidebar, that can still be managed purely by changing the css. You'd need to write the HTML in such a way that future changes are kept in mind (this might mean a bit of bloat like extra classes or spans and things for if some extra images or styles are needed).
     
    Stomme poes, Mar 5, 2008 IP
  13. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    aaa boi, this is a pain in the ass. I hate CSS lol...i know it but still a little rusty on it. How do i make it where i can change the site with just css?
     
    wwe9112, Mar 5, 2008 IP
  14. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #14
    That's like asking how to build a house when you don't know how to drive a nail. Easy way would be to define the sections as how you imagine they would be used. Create a DIV for the wrapper, header,nav, content section and a sidebar then the footer. Making a simple layout. Each of those DIVs would hold specific content. Set widths etc and work within those divs.

    If you do it correctly, you can move most of it around with just CSS.
     
    shallowink, Mar 5, 2008 IP
  15. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    :( I use premade templates, should i just look for ones using css? but i i where to do that then when i get a new one the pages wouldnt be how they shoud be as styles are used differently by different people
     
    wwe9112, Mar 5, 2008 IP
  16. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #16
    Problem is you are looking for a simple solution when one doesn't exist. If you want to leverage CSS so you don't have to rewrite the pages on request; you have to know CSS. I would recommend picking up CSS templates but I have recently seen a few of those that are just horrid. They would do more harm than good. Maybe someone else has some templates that are useful and will post links.

    I would just tell your uncle, its time to make up his mind and don't make more than a single page until he gets what he wants. Then make the rest of the site.
     
    shallowink, Mar 5, 2008 IP
  17. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #17
    I'm just going to tell him i don't think i can do it at this time, or ima use a cms, they seem harder, but i'll get used to it, and then you don't have to worry about changing the theme and such since it'll do it on all pages...is that a good idea to go?
     
    wwe9112, Mar 6, 2008 IP
  18. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #18
    Works with me. I have a feeling you will be right back at this same spot though. Customizing most CMS scripts requires CSS/HTML and PHP. But you can do a lot with wordpress.
     
    shallowink, Mar 6, 2008 IP
  19. wwe9112

    wwe9112 Guest

    Messages:
    186
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    I know HTMl and CSS lol, I just don't know how to do the sms thing. I'm thnking aboutjoomla though.
     
    wwe9112, Mar 7, 2008 IP
  20. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #20
    Do you want to know CSS?

    Get to your library and look for this book: HTML Utopia: Designing Without Tables Using CSS by Rachel Andrew and Dan Shafer. It's gotta be there; it's old enough.

    They start with HTML (the content almost never changes throughout the book), and an image of how the "designer" wants it to look. Do first they do a one column, then two column, then three column page, using different techniques and the pros and cons of each one. You learn how to actually use css to make not text changes or little things like that but Layouts. Big juicy chunks of page.
    I mean, you can usually make like 4 big chunks: header, sidebar, maincontent, footer. Usually in that order.
     
    Stomme poes, Mar 7, 2008 IP