473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Automating a Web Site Template

I'm working on a web site I'm almost done with designing the appearance using pure HTML and CSS, so I'm done as an HTML template.

Most of the HTML code should be replicated into almost all my current pages and any newly created HTML page.

To copy and paste the HTML for the entire HTML pages, in order to have the same menus, footer, etc., is a tedious and less efficient.

What is the best way to replicate all the COMMON HTML code among all pages, using an automated or a programming way? (in order to be able to modify only one file instead of every file) Also this behavior would be impossible if some design has to change in the future.

Is this doable using only Scripting languages, can I use Java, for instance?

Please help. Thank you
Oct 31 '09 #1

✓ answered by Markus

@hsheboul
What server architecture are you running your site on? Apache? IIS? Do you have any server-side programming languages available on the site, e.g. PHP, ASP.NET, etc.?

If you do not want to look into these options, then you might see if your hosting provider allows for server side includes (SSI).

4 2051
Markus
6,050 Expert 4TB
@hsheboul
What server architecture are you running your site on? Apache? IIS? Do you have any server-side programming languages available on the site, e.g. PHP, ASP.NET, etc.?

If you do not want to look into these options, then you might see if your hosting provider allows for server side includes (SSI).
Oct 31 '09 #2
@Markus
Thanks Markus, you've been a great saver.

My Web site is hosted on a Linux system, with Apache. But SSI is exactly what I needed; it was the best fit.

The apache docs for ssi-howto and `mod include' were not enough, that I'm currently trying to automate small changes between some pages, e.g. for the menu that differs from one page into another, where the options are dependent on the *current* active page.

Otherwise, all is well.
Nov 4 '09 #3
Markus
6,050 Expert 4TB
@hsheboul
Hey, Hsheboul.

The conditional SSI operators may be helpful to you. See the following example:

Expand|Select|Wrap|Line Numbers
  1. <!--#set var='page' value='$DOCUMENT_NAME' -->
  2. <!--#if expr='"${page}" = "page1.html"' -->
  3.     Display menu relative to page 1.
  4. <!--#elif expr='"${page}" = "page2.html"' -->
  5.     Display menu relative to page 2.
  6. <!-- ... -->
  7. <!--#else -->
  8.     Display a default menu.
  9. <!--#endif -->
  10.  
Do you see how you could display a menu based on the page now?

Let me know if you need some more help,
Mark.
Nov 4 '09 #4
Thanks Markus for your quick reply. I was reading and experimenting through the SSI conditionals, and that requires some sort of "twedling" with the Apache server docs -- as some new stuff and different things that I was thinking before. For instance, the Linux environment variables need to be set/pass to the Apache.
Nov 20 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Charles Banas | last post by:
weird subject - i hope more than just one curious regular will hear me out. :) ok, i've got a bit of a big problem, and i need answers as soon as possible. i know this forum is meant for web...
2
by: osgnamah | last post by:
Hi All; I am getting ready to launch a shareware program in the next few weeks and the last step is going to be creating a website. So the last few days I've been doing some web surfing in...
7
by: xzzy | last post by:
I need to automate a report in a different database (and thank yous to Terry Kreft for pointing me in the right direction). below is the code with the one line that does not work, marked: 'Does...
22
by: Howard Kaikow | last post by:
There's a significant problem in automating Excel from VB .NET. Reminds me of a problem I encountered almost 3 years ago that was caused by the Norton Auntie Virus Office plug-in. Can anybody...
1
by: Liam.M | last post by:
HEY GUYS, need some urgent help here....I am querying my database based on a DueDate field...and want to send an automated email to anyone that falls within two months PRIOR to this "DueDate",...
3
by: vijaykokate | last post by:
Our company http://www.softnmation.com/ offers its customers a great variety of products. Everything you need can be found in this site. Web Template, CSS Template, Logo Template, Corporate...
8
by: Jimbo | last post by:
Hello I am currently designing an internal ordering system for IT equipment. I am designing it in ASP.NET (vb) using Visual Studio 2003 and using Microsoft SQL Server I have got the system...
4
by: Hafner Avi | last post by:
Hi, I am trying to find out what is the difference between Web-Site and Web-Application-Project in Visual Studio 2005 ? People – what do you recommend ?
1
by: Bazza Formez | last post by:
Hi, I am wanting to build a new site & have decided to start with a template from www.asp.net ... the TimeTracker template is an ideal starting point for me. I started a new web site from VS...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.