httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Thompson <ht...@sasknow.com>
Subject Re: SSI: Cake & eat it too :-)
Date Fri, 24 May 2002 18:23:37 GMT

RuneImp wrote to users@httpd.apache.org:


Hi there. Thanks for the reply. Comments within:


> There PHP files. Have your clients publish standard HTML pages and
> then have your PHP files include them & strip out the extra bits.

Hmmm.. I could think of a few ways to do this, but I want to preserve
the original directory structure of the HTML files, so that URIs are
not changed or mangled. I.e., http://host/page.shtml should still be
called /page.shtml. Not /head.php?suck=/page.shtml or something
similar, as that confuses a lot of things, including spiders and log
analyzers. ;-)

The editors that we tested all (correctly) ignored the SSI directives,
so having SSI directives inside the source files is not a big deal.
Being able to call pages by their original names *is* a big deal,
though.

I even thought of doing something unelegant like this:

<HTML>
 <HEAD>
 <!--#include virtual="/head.php?title=Sample%20Page" -->
 </HEAD>
 <BODY <!--#include virtual="/head.php?title=Sample%20Page&b=1" --> >

 <!--#include virtual="/foot.php" -->
 </BODY>
</HTML>


But that requires a double entry of the title (error prone :-) and
*also* breaks the WYSIWYG editors' validation, so it's a no-go.  :-)


> Or setup a PHP interface they can access to create the files that
> will be used by the SSI.

Good idea, but not really an option for this site, as many files are
in use, and they are already familiar with standard methods of web
editing and publishing.


Hmm. Maybe breaking validation isn't a bad thing. The pages seem to
render fine in all of the major browsers. :-) :-)

- Ryan



> ----- Original Message -----
> From: "Ryan Thompson" <httpd@sasknow.com>
> To: <users@httpd.apache.org>
> Sent: Friday, May 24, 2002 10:42 AM
> Subject: SSI: Cake & eat it too :-)
>
>
>
> Hi all,
>
> I hope this isn't too far off-topic for this list... If so, please let
> me know :-)
>
> I'm working on a fairly typical site using SSI, but I'm having trouble
> getting the resulting output to validate correctly, because, in this
> instance, I need the <HEAD>...</HEAD> and opening <BODY> tag to be
> part of the included file, and not part of the original source. So I
> *want* to do something like:
>
> <HTML>
> <!--#include virtual="/master/head.php?title=Sample%20Page" -->
>
> ... Page content ...
>
> <!--#include virtual="/master/foot.php" -->
> </BODY>
> </HTML>
>
> head.php does some dynamic things with META tags in <HEAD>, dependent
> on the DOCUMENT_URI, and the opening <BODY> tag also changes for
> different regions of the site, so they really need to be dynamically
> generated by an include.
>
> The trouble is, the pages have to be maintained by the client's
> publishing department, so they're going to be using certain WYSIWYG
> editors that mangle the source to include <BODY> and <HEAD> elements
> if not present...which, when saved, cause the final output to not
> validate to 4.0 transitional standard, because of the multiple body
> and head elements.
>
> I'm sure someone has come across this before, but, at the moment, I
> can't think of an elegant solution. (i.e., one that does not require
> several includes, or break validation). Any thoughts?
>
> Thanks,
> - Ryan
>
>

-- 
  Ryan Thompson <ryan@sasknow.com>

  SaskNow Technologies - http://www.sasknow.com
  901 1st Avenue North - Saskatoon, SK - S7K 1Y4

        Tel: 306-664-3600   Fax: 306-664-3630   Saskatoon
  Toll-Free: 877-727-5669     (877-SASKNOW)     North America


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message