Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

beginner to HTML.....

HTML

  • Please log in to reply
2 replies to this topic

#1 Gondoma

Gondoma

    CC Lurker

  • New Member
  • Pip
  • 6 posts

Posted 14 January 2011 - 11:21 PM

actually a virtual beginner to all coding but anyway. Im helping my dad create a website and he wants links that are consistent throughout the entire site and can be viewed on every page. Simple enough i just created a "template" that i was going to go on then saved each one and added in the content that he wanted. after doing this he asked me to change one of the links to point elsewhere.....thats when i realized there is certainly a better way to go about this than go through every page and edit where the link points. The only logical thing i can think of is there must be a way to input this into the CSS file but i cannot find my answer out on the web. Im sure this seems like a real beginner question. I hope thats ok.

BTW
The site is not live yet
if you would like to see the code im happy to post but i have no idea where to start posting. Unless you want to see all of it.
  • 0

#2 Alexander

Alexander

    YOL9

  • Moderator
  • 3963 posts
  • Location:Vancouver, Eh! Cleverness: 200
  • Programming Language:C, C++, PHP, Assembly

Posted 14 January 2011 - 11:48 PM

Either server side includes (With Apache) or using PHP can be used to aid in your templating. Each of your pages can include something like this with PHP:
<?php
require("menu.html");
?>

<!-- anything in normal HTML here, but the contents of menu.html will be added -->
Essentially you will only need to edit menu.html to reflect the changes on all pages that require() it.

Note: You will need to download a local web server to run PHP, so you can download one (see the FAQ of this forum section) or just run it on your live site.
  • 1

All new problems require investigation, and so if errors are problems, try to learn as much as you can and report back.


#3 Gondoma

Gondoma

    CC Lurker

  • New Member
  • Pip
  • 6 posts

Posted 14 January 2011 - 11:55 PM

Awesome! Thank you for pointing me in the right direction.
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download