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

Re: [Cheetahtemplate-discuss] How do I reference functions from another template?

Expand Messages
  • mobiledreamers@gmail.com
    What is the problem with #include?Thanks ... -- Bidegg worlds best auction site http://bidegg.com ... The NEW KODAK i700 Series Scanners deliver under ANY
    Message 1 of 20 , May 7, 2009
    • 0 Attachment
      What is the problem with #include?
      Thanks

      On Thu, May 7, 2009 at 12:48 PM, Tavis Rudd <tavis@...> wrote:
      Tyler and all the '#include' users out there,
      There was a typo in my email.  I meant to say that while I would love to axe the #include directive, too many people rely on it for that to be possible (my email said too many people rely on '#inherits').  While I may not like #include, many people do and I think it is here to stay.
      Tavis


      On Thu, 7 May 2009, R. Tyler Ballance wrote:

      Everybody panic! ;)

      I said we had *talked* about *trying* to phase it out, I didn't sa we were or were not, thus my followup question about how folks are using #include

      (topposting from my phone :-!)

      -----Original Message-----
      From: Jean-Baptiste Quenot <jbq@...>
      Sent: Thursday, May 07, 2009 2:29
      To: cheetahtemplate-discuss@...
      Subject: Re: [Cheetahtemplate-discuss] How do I reference functions from        another template?

      2009/5/5 R. Tyler Ballance <tyler@...>:
      On Mon, May 04, 2009 at 09:34:03PM -0400, Saul Jaspan wrote:
      Lets say I have a template, dir1/dir2/dir3/foo.tmpl:

      #def FooFunct($param1, $param2):
        Stuff here
      #end def

      and another template where I want to call FooFunct, dir1/base.tmpl:

      #include "dir1/dir2/dir3/foo.tmpl"
      #* Want to call $FooFunct("1", "2") *#


      Tavis and I have talked about starting to try to phase out the "#include"
      statement so I wouldn't exactly recommend it if you can avoid it.

      Interesting, we use #include everywhere so that the template writers
      can write their templates without having to compile them by hand.  How
      would I automatically compile referenced templates?

      Do you remember my patch about not checking the last modification date
      of included files?  I only use it in production to avoid stat() system
      calls, but in development it's very handy!

      Anyway if you drop support for #include I think I'll have to stay with
      the current version, which is fine for me.
      --
      Jean-Baptiste Quenot
      http://jbq.caraldi.com/

      ------------------------------------------------------------------------------
      The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
      production scanning environment may not be a perfect world - but thanks to
      Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
      Series Scanner you'll get full speed at 300 dpi even with all image
      processing features enabled. http://p.sf.net/sfu/kodak-com
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss


      ------------------------------------------------------------------------------
      The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
      production scanning environment may not be a perfect world - but thanks to
      Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
      Series Scanner you'll get full speed at 300 dpi even with all image
      processing features enabled. http://p.sf.net/sfu/kodak-com
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss

      ------------------------------------------------------------------------------
      The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
      production scanning environment may not be a perfect world - but thanks to
      Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
      Series Scanner you'll get full speed at 300 dpi even with all image
      processing features enabled. http://p.sf.net/sfu/kodak-com
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss




      --
      Bidegg worlds best auction site
      http://bidegg.com
    • R. Tyler Ballance
      ... It was committed (974f7e738a2abbca73b90c95d6a3f508ac17affb) and shipped with v2.1.1 *cough* stop top posting already *cough* -- -R. Tyler Ballance Slide,
      Message 2 of 20 , May 7, 2009
      • 0 Attachment
        On Thu, May 07, 2009 at 09:38:42PM -0700, mobiledreamers@... wrote:
        > Do you remember my patch about not checking the last modification date
        > of included files? I only use it in production to avoid stat() system
        > calls, but in development it's very handy!

        > Can you share this maybe we can add it in the GIT cheetah repo?


        It was committed (974f7e738a2abbca73b90c95d6a3f508ac17affb) and shipped
        with v2.1.1

        *cough* stop top posting already *cough*

        --
        -R. Tyler Ballance
        Slide, Inc.
      Your message has been successfully submitted and would be delivered to recipients shortly.