Click to See Complete Forum and Search --> : coding efficiency


compute_a_nerd
01-12-2006, 06:47 PM
Hello all.
I was wondering (in HTML) how you can access a css/txt... file and implement it into my .html pages, saving coding time.

I.E. I have one universal css file, and am able to impliment that file in my index/secondary pages.

Is there a tutorial for this somewhere?
THanks
Chris

pcthug
01-12-2006, 07:25 PM
http://www.w3schools.com/css/css_howto.asp

compute_a_nerd
01-13-2006, 10:46 AM
Thanks so much, I was also wondering though, how you can call up text files
E.X.
<link rel="What can go here" type="what can go hee"
href="*.*" />
I looked on the above tutorial but couldn't find the correct syntax


thx so much. This forum has been a great help.
Chris

Charles
01-13-2006, 11:38 AM
There is a way to do that by extending the DTD in the DOCTYPE but it is forbiddenn in HTML and not very well supported in XHTML.

compute_a_nerd
01-13-2006, 11:47 AM
what do you consider the best alternative to this to be?

thanks
Chris

Charles
01-13-2006, 11:52 AM
Server Side Includes. All the cool kids are using them.

pcthug
01-14-2006, 12:45 AM
Server Side Includes. All the cool kids are using them.

Very simple to use and implement into your site. EX.

<!--#include file="*.*" -->

Then save with a .shtml extension, or your page will ignore the SSI.

And you are not just restricted to txt files, you can add nearly any Web-safe files.

NogDog
01-14-2006, 01:05 AM
But the really cool kids do it with PHP includes. ;)

pcthug
01-14-2006, 03:36 AM
But the really cool kids do it with PHP includes. ;)
Yes, but they do not offer the simplicity of SS Includes

Markbad311
01-14-2006, 03:57 AM
have you thought of XML and XSLT style sheets? good way to display data without much knowledge.

Markbad311
01-14-2006, 03:59 AM
I got to say though PHP is the way to go.

the tree
01-14-2006, 06:24 AM
Yes, but they [[php includes]] do not offer the simplicity of SS Includes<!--#include file="include.inc" -->
<?php include "include.inc"; ?>Would you seriously argue that one of those is any simpler than the other?

pcthug
01-14-2006, 07:14 AM
Yes. SSI require a single line of code to have a successful Include.
PHP require more attention; function, header(), $thispage, all these can quickly make PHP a chore.

NogDog
01-14-2006, 12:04 PM
Yes. SSI require a single line of code to have a successful Include.
PHP require more attention; function, header(), $thispage, all these can quickly make PHP a chore.
Well, if you're using all those things, you are doing more than just a simple include of another file, so of course it's more complicated. But that's like saying using English to say, "Hello. How are you?" is more complicated than using French to say "Bonjour."

felgall
01-14-2006, 02:30 PM
I agree with the Tree. Straight includes using PHP are just about identical to server side includes except for slightly different syntax. The complexity of the PHP option comes when you add PHP to your page other than include statements. I use SSI for most of my web pages where I just need to include a standard template and PHP where I need more than that. Saves the overhead of parsing the pages for PHP when all they have in them is includes.

compute_a_nerd
01-15-2006, 01:29 PM
I didn't know this would open such a large can of worms, but I really do appreciate the input. I am going to go with the SSI, primarily because of the unique situation I'm in. This site needs to stay as simple as possible because webmasters even more unexperienced than I will take the site over next year.

Thanks a lot
Chris