Solved

How to use common elements without PHP includes??

Posted on 2008-09-29
6
260 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
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

718 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