Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question of the day

Status
Not open for further replies.

Cadwalader

IS-IT--Management
Feb 12, 2002
297
US
Hello....

A thought occured to me just now..."Is there a better way to build a website, update it, and add content without having to code it maually with HTML?" What I am getting at is should I use php or something that allows me to change parts of ALL the pages in one shot without having to literally open the source for each and every page and edit it manually?

I type fast enough now, I don't need the practice anymore ;-).

I have couhght wind of using php to do this, but before I buckle down and waste three months learning it just to find out that it's not going to be able to do what I want it do, I thought I'd get a second opinion...

Hope I was of some help...
--OR--
Thanks for the help...
--Rich

 
You should use CSS - Cascading Style Sheets.

You can set a default font, font size, color, background, bold, underline etc.

All you have to do is create a text file in notepad and save it as myfilename.css and then do a line in the <head> section of each page you want to automatically update:

<link rel=&quot;stylesheet&quot; href=&quot;myfilename.css&quot;>

And then when you change the css file, you change every page with that line on.

Check out my site and add &quot;/dream.css&quot; to the address to see an example of the style sheet's code.

Mine is pretty basic, and there are loads of commands you can add to it. You can find lots of css tutorials on the web.

Hope I helped.

Take care.

Paul C
 
Thanks for the reply,


I use CSS1,2 and CCSP (when I can get away with it) quite heavily. I find it counter productive to not use CSS.

What I was talking about is when a web site gets to around 50 pages, it's annoying as all heck to have to re-code every single page by hand. Rather than have to do that, wouldn't it be noce to have a few templates for the top, bottom and maybe the left side (like, for navigation)?

example:

Say on the left side of all 53 pages on my website there is a nice navigation stack. Now I need to add a link to all of the pages. Instead of having to manually go in to each and every document to add a link, I could just add a link to a template. When the pages are viewed, the templates are called, parsed, and served to the user as one complete document.
Similar to a javascript include....but not all browsers support javascript properly (thank you, once again, Micro$oft).

Of course, the pages would need to be parsed in order for something like that to be made a reality. Hope I was of some help...
--OR--
Thanks for the help...
--Rich

 
SSI..I just started learning it an it is great..Just what ya need..

Server Side Includes..

frames without frames..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
virt2002 is correct SSI was a great technique. However it's somewhat old now and being replaced by techniques that support url hiding like XML transforms and MVC architectures.

-pete
 
Oh yeah, forgot to mention that I still do plenty-o SSI development today.
:)
-pete
 
Well forgive me for being so far behind there palbano..

Have fun..
logo.gif


carlsatterwhite@orlandomediasolutions.com
 
Yeah, I could have said that better.

The point I was fumbling with is that some of the new technologies and techniques have expanded upon the SSI model. They provide the same benefits in even more powerful ways as well as some extended benefits that go beyond what SSI can offer.

Areas like separation of data and display, standardized data formats, url hiding, component models, loose coupling, dynamic binding etc., are seriously addressed within the these new environments.

-pete

 
SSI is old? I just started using it, bugger!

I was recommend SSI anyday over XML etc. Simply because basic SSI is SIMPLE!!


Cadwalader, you basically answered your own question. PHP/PERL/ASP etc etc would do exactly what you want.
All you need is to create a page template and have the scripts automatically generate the pages.

One good and simple example is the Genesis Web Authoring System v2.1.0.0026:
I recommend you check it out.

There's also the option of using web portals,
POST-NUKE Content Management System

Another simple script:
Template Web 1.1
(not sure about this address)


:: :: (DRAFT VERSION)
 
Hi Cadwalader,
Cian is right. Use PHP, ASP,--any server side language you want--to include your pages. It makes things so much easier. I do all my stuff that way. Here is a simple example of how I do pretty much all my pages(in PHP):
page.php:
--------------------------------------
<?
require(&quot;head.php&quot;);
$title=&quot;page's title&quot;;
$keywords=&quot;page's keywords&quot;;
$description=&quot;page's description&quot;;
require(&quot;middle.php&quot;);
?>
<h1>Page 1</h1>
Content
<? require(&quot;end.php&quot;); ?>
--------------------------------------
head.php:
--------------------------------------
<html>
<head>
<style type=&quot;text/css&quot;>
/*my css stuff*/
</style>
<script>
<!--
//my scripts
//-->
</script>
--------------------------------------
middle.php:
--------------------------------------
<title>Site Name -- <?= $title ?></title>
<meta name=&quot;description&quot; content=&quot;<?= $description ?>&quot;>
<meta name=&quot;keywords&quot; content=&quot;<?= $keywords ?>&quot;>
</head>
<body>
<table>
<tr>
<td>left menu</td>
<td>
--------------------------------------
end.php
--------------------------------------
</td>
</tr>
</table>
</body>
</html>

People ask me why I design a whole site with temporary images and backgrounds, etc. if I will have to change everything later. The answer is simple. I update it in the head, middle, or end (.php) page, and the whole site reflects the changes.

Rick
 
palbano

Ok, I'm going to be the one to question your comment.

What reliable source tells you that SSI is outdated?

Of the people that I know, more people are beginning to use SSI than ever, so your statement is untrue in this case.

I have never read anywhere in any Apache document that SSI is depreciated or will ever be, to my knowledge Apache have no intention of depreciating it now or in the near future.

Don't tkae this the wrong way but I just don't understand where people get the idea that a certain language or feature is outdated when it is still so widely used and supported around the net. Until you read an offical Apache article saying the above then how can you decide what is outdated or not?

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
>> What reliable source tells you that SSI is outdated?

Well, I never said that, I said this first:

>> However it's somewhat old now and being replaced by
>> techniques ....

Then this:

>> Yeah, I could have said that better.
>> some of the new technologies and techniques have
>> expanded upon the SSI model. ... etc...

Then I also said this

>> Oh yeah, forgot to mention that I still do plenty-o SSI
>> development today.

So given that the original question was:

>> ...&quot;Is there a better way to build a website ... etc.

I certainly believe that my comments are relevant.

>> I just don't understand where people get the idea that a
>> certain language or feature is outdated

Well based on this thread it might be that they don't, you just misunderstood the point.

>> I have never read anywhere in any Apache document that
>> SSI is depreciated or will ever be, to my knowledge
>> Apache have no intention of depreciating it now or in
>> the near future.

It's unlikely that static html files will be deprecated anytime soon either, but I fail to see the connection to the issues I was commenting on. New things are happening, people are using them, it's a fact, there might be some benefits to using them, I'm not versed enough yet to even make a strong statement to that effect, that' really all I said.

I certainly never meant my response to be directed at Apache nor any specific web server environment. Sorry for that confusion.

There was never any negative inference meant in my post and going back and reading it, of course from my slanted perspective, I still don't see any. In the future I should consider stating that plainly.

Any more questions :)

-pete
 
Personally I think the use of SSI is growing and will continue to grow. You can do some amazing things with XSSI and it's easy (the basics anyway)! I am recommending to everyone I know to use it.
Who was it once said &quot;XSSI is the future of the web&quot;? Not entirely accurate but it says something none-the-less.

Pete, I have to admit I initially thought the same as Wullie. I don't think it's being replaced by anything, it's a different language and certainly has a future. For those unable to use Perl or PHP scripts etc SSI is an excellent way to add both dynamism and maintainability to websites. :)


:: ::
 
Hi mate,

It's unlikely that static html files will be deprecated anytime soon either, but I fail to see the connection to the issues I was commenting on.

Static HTML is simple but is not outdated either, as with anything it depends what the page is required to do. PHP, ASP, Perl, Coldfusion etc, still need a language to show to the browser after all the parsing is done on the server side.

Your statement of virt2002 is correct SSI was a great technique. However it's somewhat old now and being replaced is what I commented on. You can see from the reaction that you got in multiple posts that others here do not agree.

From your second or third post I still don't see any correction to the original statment that it is outdated.

As for the specific webserver comments, your comments about SSI relate to Apache as SSI is an Apache feature that has been expanded to work on several other web servers.

The thing that really bothers me is people posting on a public forum saying that something is outdated when it is not. Newbies reading a thread that says &quot;SSI was a great technique, but is outdated&quot; will likely take that to mean they should stop using it.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
>> The thing that really bothers me is people posting on a
>> public forum saying that something is outdated when it
>> is not. Newbies reading a thread that says &quot;SSI was a
>> great technique, but is outdated&quot; will likely take that
>> to mean they should stop using it.

I absolutely agree which is why I apologized for that.

>> that others here do not agree.

Ok, my only question is &quot;do not agree with what&quot;?

You don't agree that new techniques and technologies are being used by other people than yourselves? Do you understand my confusion about that?

-pete
 
Hi mate,

I am not saying that other languages and techniques are not being used but that does not mean that any of the originals are outdated because of it.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Wullie,

>> Hope this helps

Yep, thanks

This was a good example of why I stay away from these sorts of threads and stick to the black and white answer types... why you ask?... because I pretty much stink at it. LOL

-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top