Which template languages work best with shpaml?

14 views
Skip to first unread message

Mike Burrows

unread,
Dec 31, 2010, 5:04:17 AM12/31/10
to shpaml

Hi,

I'm new here, just had quick play with shpaml and mako. Can't help
wondering if there are other template languages that might work better
with shpaml? Mako seems ok, but maybe other languages can make better
use of shpaml's indentation and automatically close control structures
etc? I use Pylons and am considering Pyramid so would want good
integration with either/both of those too.

Thanks,
Mike
m...@asplake.co.uk
http://positiveincline.com
http://twitter.com/asplake

机械唯物主义linjunhalida

unread,
Feb 16, 2011, 9:26:06 PM2/16/11
to shpaml
you can always use static rending:
write xxx.shapml
convert xxx.shpaml -> xxx.html
then use whatever template engine you like to render xxx.html.

dynamic rending... maybe I can figure it out with pyramid..

Steve Howell

unread,
Feb 17, 2011, 12:49:16 AM2/17/11
to shp...@googlegroups.com
I use Django in this sequence:

Shpaml -> (shpaml preprocessor) -> Django -> (Django dynamic rendering) ->
HTML

I'm not the world's biggest fan of Django's templating language, but it
certainly gets the job done for simple problems.

I would look into Jinja, which I've heard good things about, but I don't have
first hand experience with it.

Glenn

unread,
Mar 30, 2011, 11:45:19 PM3/30/11
to shpaml
One big problem I have with Shpaml is making tags that are not self
closed or normally closed. For instance in a header template I will
leave the <body> tag open, possibly with a couple of divs, and those
will be closed in the footer.

Is there a way to handle this situation?

Jim Robert

unread,
Mar 31, 2011, 9:26:26 AM3/31/11
to shp...@googlegroups.com
if you're using the django template language, you should be able to use {% extend ... %} rather than including a head and foot chuck in each page
Reply all
Reply to author
Forward
0 new messages