Howdy! Hacking away on my CMS I was curious as to how everyone else is writing templates for large projects. In my case I have several generic "page" templates which all rely on a fairly large and extensible sitetemplate. The sitetemplate and the view template for Page objects are attached.
I would appreciate any comments or suggestions relating to these templates
(and feel free to borrow or steal as much of these templates as you want for
your own projects).
I recently noticed the addition of py:layout to KID's namespace, and after
investigation determined that it just would not do for the tasks I am
currently placing on my sitetemplate's shoulders. The design was too
backwards compared to my current solution.
The only major complaint I have with my design is the requirement of a <head>
section in the page templates, even if it is an empty <head /> - otherwise no
header is emitted. I have also been banging my head against a solution that
would allow for the following:
<head>
<title>Page Title</title>
</head>
And would emit the full header with the following title:
<title>Page Title - Site Title</title>
I just can't seem to get a py:match statement to return the item's CDATA, only
child nodes, and it's beginning to get a little aggravating. Anyone know the
answer?
- Matthew
P.s. I'll be releasing the CMS first beta once I can iron out a few
showstopper bugs - like @turbogears.expose returning the following error:
AttributeError: 'module' object has no attribute 'expose'
Navigation |
Folder Title
pgpp3hiDHS1oB.pgp
Description: PGP signature

