This is informal wishlist of things people would like to see improved in Cheetah. It complements the ToDo_ list. Items that are completed or moved onto the ToDo_ list should be removed from this list. Please sign and date your new wishes and comments on existing wishes. Use horizontal rules to separate wishes. -- TavisRudd_ - 03 Nov 2001 DoneItems_ -- WishList_ and ToDo_ items that have been implemented. --- *Inheritance is nonintuitive* InheritanceNonintuitive_ (surprises with #extends and #implements) --- *Get modification time of template source* To implement a "page updated DD-MMM-YYYY" that automatically tracks the modification time of the template source, we need a way to get that date. Let's have cheetah-compile do: ticks = os.path.getmtime(tmplSourceFile_) templateDef = templateDef.replace('__MTIME__', str(ticks)) "__MTIME__" is highly unlikely to occur otherwise in the file, and it's parallel to the Python compiler's use of "__FILE__" and "__LINE__". Question: are the template's ._fileName and ._fileMTime (or ._fileMtime?) attributes an adequate substitute? --- *Restricted importing* (RestrictedImporting_) Forcing user templates to import only allowed objects from modules. -- MikeOrr_ - 25 Nov 2001 for Michael Halle -------- *Default values* (DefaultValues_) A way to specify a default value for a missing $placeholder. -- MikeOrr_ - 13 Nov 2001 ----- *CGI parameters (GET and POST fields)* (CgiParameters_) The current $placeholder syntax for CGI parameters is more verbose than it could be. -- MikeOrr_ - 13 Nov 2001 ----- *Message Catalogs* MessageCatalogs_ are a way to handle multilingual documents. -- MikeOrr_ - 08 Nov 2001 ---------------------------------------------------------------------------------- *Specializing Caches* Caches that can be specialized/varied by session vars, qstring vars, cookie vars, etc. -- TavisRudd_ - 03 Nov 2001 ---------------------------------------------------------------------------------- *Extended statements* It would be cool if you could do #(set $x = $y) instead of #set $x = $y# (or with {}) -- IanBicking_ - 07 Nov 2001 Interesting idea. I'd prefer #{set $x = $y} for consistency with placeholder syntax. If we do this, it should apply to all directives, not just to #set. Except ## and one-line #def, which continue to the end of the line. By the way, can't you do this already by changing the opening and closing directive delimeters via #compiler-settings? -- MikeOrr_ - 17 Jan 2002 --------------- *No good super statement* It's not very clear how you get to the superclass method -- IanBicking_ - 07 Nov 2001 --------------- *Including utility functions in static sites* In a static site you don't have a good opportunity to add anything to the searchList. You can get functions by mixing in classes that contain all the necessary functions, but that requires making otherwise unnecessary classes. For instance: in FwArts_ (http://www.fw-arts.com/cheetah.tar.gz) I have a function that generates a thumbnail and does some other stuff on the side (PopupThumb_). It is written in Python. Right now I have a Mixin that includes just this function(/method), which effectively places it in the searchList. But it seems excessive to require a mixin for every method you might want to use. In a dynamic site you can pass those function in as part of the searchList, but there's no opportunity to do this in a static site. Maybe I can get at something when I import it? -- IanBicking_ - 07 Nov 2001 ----- *#sed Directive* SedDirective_: Strip leading/trailing whitespace within a block. Equivalent to Smarty's "strip" command. Low priority because we haven't found many uses for it. -- MikeOrr_ - 17 Apr 2002 NOTE: This can easily be implemented by using python string.strip() function:: ## file:MyPage.tmpl #import string #set myVar = $string.strip(" Hello World ") |$myVar| ## EXPECT: |Hello World| -- JensEngel_ - 20 May 2003 ---- *Filter arguments with #echo* A way to specify filter arguments to #echo, corresponding to the way they can be set for placeholders. -- Matthew Woodcraft - 12 Aug 2002