Loading ...
Sorry, an error occurred while loading the content.

1522Re: [Cheetahtemplate-discuss] #set global

Expand Messages
  • Mike Orr
    Oct 1, 2002
      On Tue, Oct 01, 2002 at 05:06:18PM -0600, Mike Warren wrote:
      > -----BEGIN PGP SIGNED MESSAGE-----
      > Hash: SHA1
      > According to the documentation, I believe I should be able to do
      > something like this:
      > ,----[first.tmpl]
      > | #set global $mike="mike warren"
      > | #include "another_template.tmpl"
      > `----
      > ,----[another_template.tmpl]
      > | <title>$mike</title>
      > `----
      > And get <title>mike warren</title> in my output. This doesn't work for
      > me, though; the included template throws exceptions complaining
      > ``mike'' isn't defined.

      Hmm, it works for me.

      Can you run "cheetah compile" on both files and send me the *.tmpl and
      the *.py versions? Maybe that will yield a clue.

      You can also put $searchList in the template to see what the searchList
      contains. The first item should be the dictionary of globals (i.e., it
      should have a 'mike' key).

      -Mike (Iron) Orr, iron@... (if mail problems: mso@...)
      http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol

      This sf.net email is sponsored by: DEDICATED SERVERS only $89!
      Linux or FreeBSD, FREE setup, FAST network. Get your own server
      today at http://www.ServePath.com/indexfm.htm
      Cheetahtemplate-discuss mailing list
    • Show all 10 messages in this topic