incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <>
Subject Re: Apache CMS and Multiple Templates
Date Thu, 30 Jun 2011 23:06:11 GMT
Pretty much. Block inheritance is very powerful when used well.

Sent from my iPhone

On Jun 30, 2011, at 7:03 PM, Dave Fisher <> wrote:

On Jun 30, 2011, at 3:47 PM, Joe Schaefer wrote:

Yes but then your templates need to have {% block %}

You mean like the following in skeleton.html?

   {% block content %}{{ content|markdown }}{% endblock %}

declarations for the inheritance to work.  Basically
if you've ever programmed in django you have the full
power of it available to you (in perl).  Instead of
thinking of the site as static, think of it as dynamic
with auto-caching turned on.  You really only lack
form input / query string handling, but on a basic
level that's doable with cgi scripts.

And javascript.

----- Original Message ----
From: Dave Fisher <>
Sent: Thu, June 30, 2011 6:42:10 PM
Subject: Apache CMS and Multiple Templates

I am curious about how to have multiple templates with Markdown.

It looks  like it requires work with "our @patterns" in lib/

I looked at the for and it is a clue.

Suppose we had a  subdirectory called ooo where we want a different look and 
feel. Is the  following a reasonable change to

   [qr!/ooo/*\.mdtext$!, single_narrative => { template =>  
"ooo_narrative.html" }],
  [qr!\.mdtext$!, single_narrative =>  { template => "single_narrative.html" 

Then in  templates.
  ooo_narrative.html is {% extends  "ooo_template.html" %}
  ooo_template.html is the  page template for the ooo subdirectory.


View raw message