Re: Templates and customization

Jeremy Bowers <[email protected]> Fri, 12 Mar 2004 12:46:44 -0500
Newsgroups gmane.comp.pythin.pyds.devel
Message-ID <[email protected]>
Georg Bauer wrote:
> My current idea on this is as follows:
> 
> - move as much code out to templates from the Python code as possible,
> as that makes customizing possible. It doesn't make it easy, but it
> makes it possible. Important first step.

Agreed; definately the first step of refactoring.

 > ...
> - move complicated code into makros to make nugget and template code
> cleaner. There can be logic in the templates, but I think there
> shouldn't be complicatd logic in them with default templates - if there
> is need for complicated logic, it should be the user putting it in
> because he needed it.
> - enhance ThemeTool in the way that it is able to store macros and
> nuggets with their templates, so people fetching a theme.zip don't need
> to add additional stuff. This is actually not very easy, but necessary,
> as nuggets and macros might be important parts of the theme.
> 
> The first two points are already started, but from the third one on
> everything is still waiting to happen. Actually I don't want the desktop
> to be table-less, as the desktop should be useable with w3m - that's my
> main browser when using text mode. Yes, I am a big egoistic on this one
> ;-)

No, that's good I think; if it works in w3m/lynx it'll typically work in 
everything else, too.

> But all *Rendering.tmpl should be table less and CSS friendly. Make the
> complicated stuff possible and the simple stuff easy, that would be the
> goal for this problem.
> 
> bye, Georg

The specific changes I made are in PreferencesTools.py and 
WeblogTemplate.tmpl, no *Rendering changes were necessary, fortunately. 
(And for organizing something into three columns, "<table>" is the 
correct solution anyhow, even on an otherwise pure-CSS site. ;-) )

So I guess my question would be, which would you prefer right now, a 
patch that allows you to have your categories rendered in columns purely 
in Cheetah, or a patch that moves category rendering into Nuggets, 
leaves relevant CSS hooks, and changes the *.tmpl files to use the 
nugget? Another way of looking at it is "Do you want to move up that 
list you gave incrementally, as patches come in, or make it an explicit 
project goal at some point and not touch it until then?"

(Please forgive me if it seems I'm making a big deal over a minor point; 
I'm trying to work out what you want to do so I don't offend anybody, or 
waste time submitting patches that take the project in a bad direction. 
This discussion has application to me beyond just this particular 
feature I did today.)