1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

My sites made in straight CSS/HTML, how do I update it?

Discussion in 'HTML & Website Design' started by cluongo18, Mar 16, 2010.

  1. #1
    I am creating my latest site in straight up HTML/CSS instead of using a script (wordpress, phpbb3, etc). I created the site, very basic, heres a test:

    http://luongonetwork.com/test/

    So how should I go about updating? Lets say I want to add a link to the navbar down the road, I will have SO many god damn pages I will have to go through, adding the link the navbar.

    People tell me NOT to use Dreamweavers Template system. And im not really sure how to implement a CMS in with this. So whats the best way to go about editing my website?
     
    cluongo18, Mar 16, 2010 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Well, I suggest to use php instead of html even for basic simple websites, since you may include the commonly used design snippets, like navigation bar, header and footer. I think this is a very good practice enabling a very easy update method of the site.
     
    Bagi Zoltán, Mar 16, 2010 IP
  3. cluongo18

    cluongo18 Member

    Messages:
    855
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #3
    So basically I can insert a line of PHP into my HTML saying "put the navbar here". And when I update a link, I just update the navbar.php file?

    Do you have any good tutorials or know of any?
     
    cluongo18, Mar 16, 2010 IP
  4. sourabhj

    sourabhj Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hello

    Well you just can't use php in .html files directly..instead if you have apache server here is a trick which can help you use php inside the html files,otherwise you would have to rename all your html files to .php...
    Here is the trick

    Go to your WWW root, usually it looks like this -
    path: /home/username/public_html

    Look for the file named .htaccess. If it's not there, create a blank page using NotePad or Dreamweaver and save it as .htaccess

    Now edit this file by adding the following lines:
    code:

    RemoveHandler .html .htm
    AddType application/x-httpd-php .php .htm .html

    Save and close the .htaccess file. Upload it to your webserver (to your WWW root) and that's it!

    Now you can edit your html page where you want to include the php file
    <?php include("navbar.php"); ?>

    And you can edit the navbar.php to include for links either from database or any logic...

    Hope that helps..
    Well if you want a dynamic site and dynamic content ,i would suggest you to switch to php completely...

    Regards
     
    sourabhj, Mar 16, 2010 IP
  5. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #5
    Bagi Zoltán, Mar 16, 2010 IP
  6. cluongo18

    cluongo18 Member

    Messages:
    855
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #6
    Thanks so much Bagi Zoltan that helped!
     
    cluongo18, Mar 18, 2010 IP