You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Chris Pepper <pe...@mail.reppep.com> on 2000/11/09 03:32:28 UTC
SSI enhancement suggestion: string insertion
On apache-docs, we've just had some discussion about SSI and
headers. Currently, most of the Apache docs headers are static HTML,
with #include virtual="header.html" just inside the <body> tag.
It would be nice to put everything standard, starting with
DOCTYPE and up to the page's unique content, in a single header.html,
but this breaks down because the <title> sits right in the middle of
that block of otherwise uniform text.
Have you considered allowing SSIs to insert literal strings
in the generated output? This would enable the whole ball of header
to go into a single SSI, something like:
<!--#include virtual="header.html" title="Why Apache Is Great"-->
Then a token in the SSI would get replaced by the title
attribute. I think this would be useful for many cases, but it would
be a big win purely for <title>.
Thanks,
Chris Pepper
--
Chris Pepper | Shooting Gallery Interactive | 212 905-2200
Mac OS X Software: <http://www.mosxsw.com/>
Re: SSI enhancement suggestion: string insertion
Posted by Greg Stein <gs...@lyra.org>.
On Wed, Nov 08, 2000 at 09:32:28PM -0500, Chris Pepper wrote:
>...
> Have you considered allowing SSIs to insert literal strings
> in the generated output? This would enable the whole ball of header
> to go into a single SSI, something like:
>
> <!--#include virtual="header.html" title="Why Apache Is Great"-->
>
> Then a token in the SSI would get replaced by the title
> attribute. I think this would be useful for many cases, but it would
> be a big win purely for <title>.
While an interesting and useful change, there is also something to be said
for "SSI is getting complicated enough; switch to use PHP or mod_perl".
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Re: SSI enhancement suggestion: string insertion
Posted by Chris Pepper <pe...@mail.reppep.com>.
At 7:18 PM -0800 2000/11/08, Marc Slemko wrote:
>On Wed, 8 Nov 2000, Chris Pepper wrote:
>
>> Have you considered allowing SSIs to insert literal strings
>> in the generated output? This would enable the whole ball of header
>> to go into a single SSI, something like:
>>
>> <!--#include virtual="header.html" title="Why Apache Is Great"-->
>>
>> Then a token in the SSI would get replaced by the title
>> attribute. I think this would be useful for many cases, but it would
>> be a big win purely for <title>.
>
>something.html:
><!--#set var="title" value="It works !" -->
><!--#include virtual="header.html" -->
>
>header.html:
><TITLE><!--#echo var="title" --></TITLE>
>
>Or you could even have header.html do an if, so that if title isn't
>defined it puts a more useful default in than "(none)"...
>
>Is there any advantage to a slight syntax change? I'm doubtful...
Marc,
Thanks. I didn't think of doing it that way. The advantage of
simplicity of use isn't worth complicating SSI, since it's unncessary.
Chris Pepper
--
Chris Pepper | Shooting Gallery Interactive | 212 905-2200
Mac OS X Software: <http://www.mosxsw.com/>
Re: SSI enhancement suggestion: string insertion
Posted by Chris Pepper <pe...@mail.reppep.com>.
At 7:18 PM -0800 2000/11/08, Marc Slemko wrote:
>On Wed, 8 Nov 2000, Chris Pepper wrote:
>
>> Have you considered allowing SSIs to insert literal strings
>> in the generated output? This would enable the whole ball of header
>> to go into a single SSI, something like:
>>
>> <!--#include virtual="header.html" title="Why Apache Is Great"-->
>>
>> Then a token in the SSI would get replaced by the title
>> attribute. I think this would be useful for many cases, but it would
>> be a big win purely for <title>.
>
>something.html:
><!--#set var="title" value="It works !" -->
><!--#include virtual="header.html" -->
>
>header.html:
><TITLE><!--#echo var="title" --></TITLE>
>
>Or you could even have header.html do an if, so that if title isn't
>defined it puts a more useful default in than "(none)"...
>
>Is there any advantage to a slight syntax change? I'm doubtful...
Marc,
Thanks. I didn't think of doing it that way. The advantage of
simplicity of use isn't worth complicating SSI, since it's unncessary.
Chris Pepper
--
Chris Pepper | Shooting Gallery Interactive | 212 905-2200
Mac OS X Software: <http://www.mosxsw.com/>
Re: SSI enhancement suggestion: string insertion
Posted by Marc Slemko <ma...@znep.com>.
On Wed, 8 Nov 2000, Chris Pepper wrote:
> Have you considered allowing SSIs to insert literal strings
> in the generated output? This would enable the whole ball of header
> to go into a single SSI, something like:
>
> <!--#include virtual="header.html" title="Why Apache Is Great"-->
>
> Then a token in the SSI would get replaced by the title
> attribute. I think this would be useful for many cases, but it would
> be a big win purely for <title>.
something.html:
<!--#set var="title" value="It works !" -->
<!--#include virtual="header.html" -->
header.html:
<TITLE><!--#echo var="title" --></TITLE>
Or you could even have header.html do an if, so that if title isn't
defined it puts a more useful default in than "(none)"...
Is there any advantage to a slight syntax change? I'm doubtful...