Hi,
I've followed the badger book chapter 11 example but obviously I
missed something. There is a structure called 'site' that contains
the site name and other stuff:
[EMAIL PROTECTED] templates]$ more lib/config/site
[% site = {
name = 'mysite.com'
[...etc...]
}
-%]
And use site in my index page template:
[EMAIL PROTECTED] templates]$ more src/index.html
[% META title = site.name
about = ''
type = 'mainpage'
%]
<h2>Welcome to [% site.name %]!</h2>
[...etc...]
While the second use of site.name correctly produces "Welcome to
mysite.com!", the earlier reference to site.name produces an error:
[EMAIL PROTECTED] ttbook2]$ ./ba
ttree 2.75 (Template Toolkit version 2.13)
Source: /home/amead/web/ttbook2/templates/src
Destination: /home/amead/web/ttbook2/html
Include Path: [ /home/amead/web/ttbook2/templates/lib ]
Ignore: [ \b(CVS|RCS)\b, ^# ]
Copy: [ \.(png|gif|jpg|pdf)$ ]
Accept: [ ]
Suffix: [ ]
+ css/styles.css
+ index.html
! file error - parse error - index.html line 1-4: unexpected token
(site)
[% META title = site.name
about = ''
type = 'mainpage' %]
[...etc...]
Could anyone explain why (I think I'm missing something) and point me
in the right direction to fix this? Thanks in advance!
-Alan
__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates