473,503 Members | 3,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Automating a Web Site Template

14 New Member
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
4 2058
Markus
6,050 Recognized Expert Expert
@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
hsheboul
14 New Member
@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 Recognized Expert Expert
@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
hsheboul
14 New Member
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
4315
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
2313
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
2612
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
15312
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
2337
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
2433
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
1527
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
20388
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
1113
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
7261
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7445
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4991
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3158
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.