Solved

How to use common elements without PHP includes??

Posted on 2008-09-29
6
259 Views
Last Modified: 2013-11-19
hi all,

I'm guessing this is an easy one, I hope so:

I've done many sites over the years, using Dreamweaver as my main program. Done them in HTML, and many with PHP.

Recently, I've really liked using PHP includes for my navigation bars, headers and footer. I like this rather than using Templates within Dreamweaver.

I now have a client, that for SEO reasons, will not let my use PHP, they strictly want HTML, XHTML or CSS.

Within that, how can I use common elements like a footer or header throughout, without having it actually coded onto each page?

Thanks, Cory

0
Comment
Question by:stonerome
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 350 total points
ID: 22599410
in html, the INCLUDE syntax is called, surprisingly: include
http://www.boutell.com/newfaq/creating/include.html
0
 
LVL 70

Assisted Solution

by:Jason C. Levine
Jason C. Levine earned 150 total points
ID: 22599411
Hi Cory,

You can use regular server side includes if the host is set up correctly:

<!--#include virtual="/includes/header.html" -->

What might be easier for you is to use Dreamweaver to handle includes via Library Items.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 22599417
*shakes tiny fist at AngelIII*

Beat me by seconds!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:crush83
ID: 22599643
I'm not sure how much PHP includes would really affect SEO now days, though I guess it doesn't matter if it's not what the client wants.
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22600223
PHP gets SEO optimized just FINE by all the major SEngines -- if not 60% of google pages would disappear!

However, people harbor long standing preconceptions, even if they are now outdated.  AS long as you don't make links in javascript, and you do page renames from queries in the HTACCESS, PHP is indexed fine.
0
 

Author Closing Comment

by:stonerome
ID: 31501308
thanks all...knew it was probably easy!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question