Jump to content

beginner to HTML.....

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Gondoma

Gondoma

    Newbie

  • Members
  • Pip
  • 6 posts
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.

#2
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
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.
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#3
Gondoma

Gondoma

    Newbie

  • Members
  • Pip
  • 6 posts
Awesome! Thank you for pointing me in the right direction.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users