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

1518Re: [Cheetahtemplate-discuss] #set global

Expand Messages
  • Johannes Erdfelt
    Oct 1, 2002
    • 0 Attachment
      On Tue, Oct 01, 2002, Mike Warren <spam@...> wrote:
      > 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.
      >
      > This is with CVS Cheetah updated today (just now, actually).
      >
      > Any hints? Thanks,

      You can't do that. When you include another template, it'll have a
      different namespace.

      You can probably do what you want via inheritance tho.

      JE



      -------------------------------------------------------
      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
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Show all 10 messages in this topic