WEB Very simple design question...

Discussion in 'OT Technology' started by zaphod, May 31, 2008.

  1. zaphod

    zaphod Smashing Treats!

    Joined:
    Jan 19, 2003
    Messages:
    18,213
    Likes Received:
    0
    Location:
    Betelgeuse
    Im setting up a new site and trying to learn CSS.

    Ive been looking at professionally done sites, and I noticed that when they link to their pages (Home, about, products, etc)... I see that they simply go to a folder created there rather than about.htm or something.
    So when you click about it might go to

    www.asdf.com/about

    To do this I simply create a folder for each link and then put an index.html file in there?

    Second question... Say I have index.html for the Home page (with news and all that jazz), and then I have an about me section. I assume that theres no easy way to change all of the parts on all the pages at once.. say I want to remove one of the links (or change "about" to "about me"),... then i would have to go to each folder respectively, open the index.html file, and then make those changes? Its not a big deal.. but im wondering how bigger sites manage this because i feel like that would get really complicated.
     
  2. zaphod

    zaphod Smashing Treats!

    Joined:
    Jan 19, 2003
    Messages:
    18,213
    Likes Received:
    0
    Location:
    Betelgeuse
    Also, what is up with all the "meta" header info... i see some sites with literally like 12 meta tags
     
  3. i think it's safe to assume that 99% of sites don't link to a folder with an about.html as it's own index. it's all done with .htaccess/php or however other method and it's done purely to mask the filename's extension and any other sensitive information that can be viewed along with it

    for example www.asdf.com/purchaseitemno=1?delete and stuff like that can be mased to look like asdf.com/purchaseitemno or something else.

    most blogs today do that permalink method for seo reasons, so instead of a hyperlink looking like asdf.com/00/2008/200303, their url will instead look like asdf.com/this-is-the-title-of-the-blog-entry
     
  4. zaphod

    zaphod Smashing Treats!

    Joined:
    Jan 19, 2003
    Messages:
    18,213
    Likes Received:
    0
    Location:
    Betelgeuse
    How do I do that? And what file structure should I set up?
     
  5. Josh

    Josh Guest

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^boreddaily.com [nc]
    rewriterule ^(.*)$ http://www.boreddaily.com/$1 [r=301,nc]





    RewriteRule ^picture/(.*)/(.*) view.php?var1=$1
    RewriteRule ^game/(.*)/(.*) view.php?var1=$1

    RewriteRule ^pictures/(.*)/(.*) funnypictures.php?start=$2



    RewriteRule ^(.*)/myspace.jpg myspace.php?start=$1

    RewriteRule ^jokes/(.*)/(.*).html jokes.php?cat=$1&action=cat

    RewriteRule ^joke/(.*)/(.*).html jokes.php?joke_id=$1&action=joke

    RewriteRule ^tags/(.*).html search.php?q=$1&type=tag


    RewriteRule ^newest/(.*)/(.*).html newest.php?start=$2

    RewriteRule ^popular/(.*)/(.*).html popular.php?start=$2

    RewriteRule ^toprated/(.*)/(.*).html toprated.php?start=$2

    RewriteRule ^lyrics/page/(.*).html lyrics.php?start=$1

    RewriteRule ^lyric/(.*)/(.*) lyrics.php?showl=$1


    RewriteRule ^videos/(.*)/(.*).html videos.php?start=$2

    RewriteRule ^video/(.*)/(.*) view.php?var1=$1

    RewriteRule ^cool-videos videos.php

    RewriteRule ^games-arcade games-arcade.php

    RewriteRule ^funny-pictures funnypictures.php

    RewriteRule ^funny-jokes jokes.php



    RewriteRule ^games/(.*)/(.*).html games-arcade.php?start=$2
     
  6. just go back to basics with your structure. keep all of your html files in the same folder and link them to each other. the only time you have to start worrying about having additional files in seperate folders is when you start working with php and js and maybe even css files where you have to include php configuration files for your database, js effect files like mootools or lightbox, etc.
     
  7. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
  8. zaphod

    zaphod Smashing Treats!

    Joined:
    Jan 19, 2003
    Messages:
    18,213
    Likes Received:
    0
    Location:
    Betelgeuse
    Thanks.

    My main concern is..
    I'm in the process of designing the content (the html files) and also the style (the CSS) of a new site. Say I have 3 sections... Home, About and Products, and each of those are home.htm, about.html, and products.html. With all of these goes the style css sheet.

    They all have different content, and for the most part the same style.

    How is the best way to go about editing the content and style?

    -Should I make the index page first completely, and copy and paste that to about and products, and edit from there? What if I want a friend to work on about while I work on index content... but I'm not done with the index page so he can't just copy it over and rename it. That means I have to carry over all changes thereafter to each page??. I feel like it's alright for 3 pages... to carry the necessary edits to each page, but how do they do that shit for complicated pages. Is there an easier way I'm not seeing?
    -And should a single css file cover all three home/about/product pages, or should there be a separate one for each? The style will mostly be the same, I imagine just the css ID's might be different.
     
  9. zaphod

    zaphod Smashing Treats!

    Joined:
    Jan 19, 2003
    Messages:
    18,213
    Likes Received:
    0
    Location:
    Betelgeuse
    anyone :o
     
  10. there are more efficient ways to do things, but you dont have to worry about that stuff until you start messing with php includes. for basic html/css, you're good with creating one template page first, then copy/pasting and modifying what you need after you finish the template page. i believe dreamweaver has a nice feature on working off of template pages where you can create editable regions that change all the files when the master file is changed too.
     
  11. Slid.

    Slid. I'm a guy.

    Joined:
    Oct 25, 2001
    Messages:
    1,928
    Likes Received:
    0
    Location:
    NH
    On larger sites I'll have a header and footer file that I wrap around each of my content files. This makes it so any changes to navigation (like you were saying, about -> about us) will happen globally rather than having to go and change each page individually.

    Assuming your server allows PHP.

    I'd create a normal page, your home page for example. I'd chop everything from the top (above content) into header.php and everything from the bottom (below content) into footer.php.

    Now for each of my content pages, about.php, contact.php, etc. I'll just have:

    about.php
    Code:
    <?
      include('header.php');
    ?>
    
    This is my about me content.  Blah blah blah.
    
    <?
      include('footer.php');
    ?>
    
    If you do use PHP then any .htm or .html file you use needs to instead have a .php extension (unless you make changes to your httpd.conf, maybe .htaccess can do it too, who cares).
     
  12. Slid.

    Slid. I'm a guy.

    Joined:
    Oct 25, 2001
    Messages:
    1,928
    Likes Received:
    0
    Location:
    NH
    As for your CSS I'd have a single .css file and link to it from each page (the link could be in the header).
     

Share This Page