Myk Melez wrote:
> Thanks, that worked!
Another approach is to use the new --template_module option for ttree.
For example:
ttree --template_module=My::Template::Module
Then in your template module, you can pre-define some VARIABLES, or other
resources.
My::Template::Module;
sub new {
Template->new({
VARIABLES => {
sitemap => My::Sitemap->load(),
},
});
}
> sitemap.xml has a very simple XML vocabulary with tag encapsulation
> defining the breadcrumbs hierarchy. The principle benefit of this
> approach over walking the filesystem path is that I don't have to make
> my filesystem hierarchy mimic my site structure or move files around and
> change URLs when the structure changes.
Definately a good idea.
You might also like to have a look at Template::Sitemap. It hasn't hit
CPAN yet (pending more docs, tests and examples) but you can get it from
the TT2 CVS repository as Template-Sitemap.
cvs -d :pserver:[EMAIL PROTECTED]:/template-toolkit login
cvs -d :pserver:[EMAIL PROTECTED]:/template-toolkit co Template-Sitemap
There are also the slides from the talk I recently gave London.pm about
Template-Sitemap:
http://template-toolkit.org/london.pm/template-sitemap/index.html
Cheers
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates