This Forum has been archived there is no more new posts or threads ... use this link to report any abusive content
==> Report abusive content in this page <==
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I link all my html pages to one source page?
05-11-2013, 04:57 AM
Post: #1
Can I link all my html pages to one source page?
I have a website, which I made using html. On each page there is a footer with my email, linkedIn, and twitter links. I want to be able to change the footer on all pages at the same time without having to go through all 50 pages individually.

I was hoping there would be a way to create a new html document with the contents of the footer, and then from each page link to that html document. Then I would be able to change the one html document and it would change it on all the pages.

is that possible?
thanks,

Ads

Find all posts by this user
Quote this message in a reply
05-11-2013, 05:09 AM
Post: #2
 
You can do it with a php include and put the code into your footer:

<?php
include ('footer.php');
?>

Put that code on each page in the footer, then create a new footer.php page with the html you want in it. eg:

<?php
<a href="mailto:me@nowhere.com>email me</a>
<p>blah blah blah</p>
?>

Then when you want to change all your website's footers, you just have to change the footer.php page.

Ads

Find all posts by this user
Quote this message in a reply
05-11-2013, 05:15 AM
Post: #3
 
Yes you can do that. You need to use a stylesheet (css).

<link rel='stylesheet' href='something.css'> In a stylesheet (.css file) you can give elements a unique id or class that applies to elements with the same id name or class name. Visit w3schools.com and learn css.

Oh, sorry, I thought you meant change all the documents style... Anyway yeah you can use php to include files. Like the guy above me said.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)