José Henrique wrote:
Use "print template.getId()".
2005/10/4, Chris Miles <[EMAIL PROTECTED]>:
I have a Page Template in a folder: folder1/mypage.pt
myscript is a Script (Python) containing:
Now, when folder1/mypage.pt is called TTW, it displays "folder1" as the
context.getId(), but I was expecting (and hoping) it would display
"mypage.pt"... Isn't it being called within the "context" of mypage.pt
I am not sure if the solution above works that straight in the script;
it does not magically inherit the "template" variable from the page
template, does it?
The way I would prefer to handle this is to pass the template to the script
Then add "template" to the parameters of Your script, and
template.getId() will work.
If this is to explicit for You, calling the script via:
should do what You want: not the script is called having the
template as the context (unlike "here/script", where the script has
the same context as the template).
ZPT mailing list