[Bese-devel] TAL template searching

Jan Rychter jan at rychter.com
Thu Feb 2 15:35:16 UTC 2006


I noticed that when you use <tal:include> tags, the normal root
directories of your filesystem-generator do not get searched. I suspect
this is unintended, but I'm not submitting a darcs patch, as it might
break some installations (you will no longer be able to include files
from the directory where the including template is, unless that
directory is in your list of root-directories).

The culprit is:

(def-tag-handler tal:include (tag)
[...]
        (with-tal-compile-environment (generator)
          `(funcall (load-tal ,generator ,(merge-pathnames template-name *tal-truename*))
                    (extend-environment (tal-env ,@(augmented-env)) tal-environment)
                    ,generator))))))

... and you probably want:

        (with-tal-compile-environment (generator)
          `(funcall (load-tal ,generator ,template-name)
                    (extend-environment (tal-env ,@(augmented-env)) tal-environment)
                    ,generator))))))

... since it's supposed to be the generator's job to deal with
directories.

--J.



More information about the bese-devel mailing list