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

1934Re: [Cheetahtemplate-discuss] Searchpath for #include

Expand Messages
  • Tavis Rudd
    Feb 5, 2003
    • 0 Attachment
      Yep that should work, though I haven't tested it. I have a strong gut
      reaction against designs involving #include so I've never actually used it
      outside of creating it.

      On February 5, 2003 12:49 am, Achim Domma wrote:
      > Hi Tavis,
      >
      > thanks for your fast answer!
      >
      > > you can override your template baseclass' .serverSidePath method
      > > to achieve
      > > this. Cheetah templates call self.serverSidePath on all paths in
      > > #includes.
      > > See Cheetah-0.9.x/src/Servlet.py for the baseclass that provides
      > > this method.
      >
      > Just to be sure: The path argument passed to self.serverSidePath is the
      > argument of the #import directive and the function has to return the
      > absolute local path to the file. Is this true? Then it should be possible
      > to do something like:
      >
      > absPath = join(customerFolder,path)
      > if isfile(absPath):
      > return absPath
      > absPath = join(defaultFolder,path)
      > if isfile(absPath):
      > return absPath
      > # possible more search folders
      > # ...
      > return None
      >
      > Looks such a solution ok to you? Or is there a better place to achive
      > something like that.
      >
      > Achim
      >
      >
      >
      > -------------------------------------------------------
      > This SF.NET email is sponsored by:
      > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
      > http://www.vasoftware.com
      > _______________________________________________
      > Cheetahtemplate-discuss mailing list
      > Cheetahtemplate-discuss@...
      > https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss



      -------------------------------------------------------
      This SF.NET email is sponsored by:
      SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
      http://www.vasoftware.com
      _______________________________________________
      Cheetahtemplate-discuss mailing list
      Cheetahtemplate-discuss@...
      https://lists.sourceforge.net/lists/listinfo/cheetahtemplate-discuss
    • Show all 6 messages in this topic