[Zope] SSI & DTML working together

Luciano Ramalho luciano@hiper.com.br
Wed, 30 Jun 1999 18:15:15 -0300


Here is how we generated the SSI "include" tag:

<!--#var expr="hx_include('menu.html')"-->

And the source of the hx_include external method is simply this:

def hx_include(filename):
    return '<!--#include file="%s"-->' % filename

In some places we used this DTML:

<!--#if simulate_ssi-->
   <!--#var -include-menu-->
<!--#else-->
   <!--#var expr="hx_include('menu.html')"-->
<!--#/if-->

So whenever a parameter like "simulate_ssi=1" was appended to the request
URL, we would "simulate" the SSI in Zope.

It's rather ironic having to deal with SSI issues in Zope. In the future
Zope will be everywhere and we will not have this problem...

[]s
Luciano
 


At 13:56 30/06/99 -0300, Ze Octavio wrote:
>Sergei,
>
>
>   We, at Hiperlogica, used SSI in one project too, but we made an
>External Method in Python to only include the SSI's tag after the Zope
>rendering the page. So in this case, to Zope is an External Method and
>to Apache is SSI.
>
>Hope Helps you,
>
>-- 
>Ze Octavio
>--
>Hiperlógica <http://hiper.com.br>
>Automação de web-sites | Web-site automation
>São Paulo | Brasil | Fone: +55-11-251-4894
>
>
>Sergei Barbarash wrote:
>> 
>> I have a project for which I use ZDocument template package (DTML parser)
>> without Zope. Eventually I realized that I have to use SSI in my templates.
>> When I ran a parser on my new template, it gave me a ParseError exception,
>> saying "Unexpected tag".
>> 
>> I do know that I can get all of the SSI functionality via DTML. Anyway,
maybe
>> it would be convenient to make an option, say, to leave the 'unexpected
tags'
>> as is...?
>> 
>> I made a very quick and dirty hack to ZDocumentTemplate source which 
>allows me
>> to do this. However, it would be nice if a patch could be made by
someone who
>> knows his way in the Zope source code more than I am.
>> 
>> Thanks.
>> -- Sergei
>> 
>> _______________________________________________
>> Zope maillist  -  Zope@zope.org
>> http://www.zope.org/mailman/listinfo/zope
>> 
>> (For developer-specific issues, use the companion list,
>> zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(For developer-specific issues, use the companion list,
>zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )