Hello, I want to give the name of the user currently logged in as an argument to an Z SQL-Method in a ZPT. Like that: tal:repeat="report here/reports/getReportsByUser_sql(here/getUser)" But this in incorrect. How can I do this? TIA Florian
I want to give the name of the user currently logged in as an argument to an Z SQL-Method in a ZPT. Like that:
tal:repeat="report here/reports/getReportsByUser_sql(here/getUser)"
But this in incorrect. How can I do this?
This is explained in the PageTemplates documentation. Inside the template you have the bound variable "user" that is bound to the current logged-in user. So if you need the username you would do here/reports/getReportsByUser_sql(user/getUserName) jens
This is explained in the PageTemplates documentation. Inside the template you have the bound variable "user" that is bound to the current logged-in user. So if you need the username you would do here/reports/getReportsByUser_sql(user/getUserName)
Answered too fast, this is obviously completely wrong syntax. You need python: here.reports.getReportsByUser_sql(user.getUserName()) jens
participants (2)
-
Florian Lindner -
Jens Vagelpohl