[mod_python] Mailman HTML templates to include PSP

Graham Dumpleton graham.dumpleton at gmail.com
Wed Nov 28 16:02:01 EST 2007


Use Apache SSI:

  http://httpd.apache.org/docs/2.0/howto/ssi.html
  http://www.modpython.org/live/current/doc-html/ssi.html

You could do it in two ways. First is to include PSP chunk output into
static HTML files using SSI. Second is to ditch PSP and use Python
code snippets direct in the static HTML file and produce equivalent
HTML on the fly from there.

You will need mod_python 3.3 for the latter though. You don't specify
which version of mod_python you are using.

Graham

On 28/11/2007, Anastasios Hatzis <ah at hatzis.de> wrote:
> Hi!
>
> I run two web-sites on Apache and mod_python (Debiab 4 current stable). I
> would like to integrate the PSP chunks of these websites into the HTML
> templates of Mailman 2.1.9 which I use for all lists on these sites.
>
> The patterns on all Web-pages of the sites is like this:
>
> http://www.foo.org/index.html:
>
> <%@ include file="head.psp"%>
>   <p>
>     Some content
>   </p>
> <%@ include file="sidebar.psp"%>
> <%@ include file="foot.psp"%>
>
> head.psp contains the top-level navigation which changes rather often.
> sidebar.psp is context-sensitive for each page.
> foot.psp is on all pages the same and changes are rare.
>
> Each site has multiple lists. The mailman pages are in
> http://lists.foo.org/cgi-bin/*
>
> The same is for www.bar.org.
>
> I would like to integrate the corresponding PSP files into the mailman HTML
> templates. For now I have copied and pasted the static HTML rendered by the
> PSP files into the HTML templates of the mailman lists.
>
> Since I don't want to copy & paste into the mailman templates each time the
> PSP chunks do change I would prefer a dynamic approach that works like the
> rest of my sites.
>
> Any idea how I can include the PSP chunks into the mailman HTML templates - or
> an alternative with the same effect?
>
> Thank you.
>
> Best regards,
> Anastasios
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>
>
>


More information about the Mod_python mailing list