Re: [ZPT] How to getId() of pt from a Script (Python)

2005-10-04 Thread Clemens Klein-Robbenhaar
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 containing: Testing myscript is a Script (Python) containing: print context.getId() return printed Now, when folder1/mypage.pt is called TTW

Re: [ZPT] How to getId() of pt from a Script (Python)

2005-10-04 Thread Chris Withers
Chris Miles wrote: How do I get the Script (Python) to fetch the id of the Page Template it was called from? _.getitem('template').getId() and make sure you've bound _ to the namespace using the Bindings tab. cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting

Re: [ZPT] How to getId() of pt from a Script (Python)

2005-10-04 Thread José Henrique
Use "print template.getId()". 2005/10/4, Chris Miles <[EMAIL PROTECTED]>: > I have a Page Template in a folder: folder1/mypage.pt > containing: > Testing > > myscript is a Script (Python) containing: > print context.getId() > return printed > > Now, when folder1/mypage.pt is called TTW, it d

[ZPT] How to getId() of pt from a Script (Python)

2005-10-04 Thread Chris Miles
I have a Page Template in a folder: folder1/mypage.pt containing: Testing myscript is a Script (Python) containing: print context.getId() return printed Now, when folder1/mypage.pt is called TTW, it displays "folder1" as the context.getId(), but I was expecting (and hoping) it would display