[Zope] Two more questions

Goldthwaite, Joe joe at goldthwaites.com
Tue Dec 2 19:36:01 EST 2003


I really hate to keep bothering everyone but I'm still running into things I
don't understand.

In order to keep my table headers consistent across reports, I have them
stored as a separate DTML method called IS_Ptd_Header.  In my main Income
Statement, I have this where I want the table header to show up;

<span tal:replace="structure here/IS_Ptd_Header"></span>

This works fine.  The problem I've run into is when I want to use tal tags
in the header like this;

Income Statement for period <span tal:replace="request/Per">Period</span>

If I have this line in the Income Statement, I get the Per parameter from
the URL. The same line in IS_Ptd_Header gets ignored so the resulting page
shows "Income Statement for period period".  I thought that maybe the tal
tags were being ignored because IS_Ptd_Header is a DTML method so I created
a ZPT with the name IS_YTD_Header and used that in the tal replace command
but the result came back as HTML quoted text instead of the actual HTML.
Anyone know what I'm missing?


Second problem.  I have an external method called GetISLines.  The actual
function being called looks like this;

def GetISLines(FY = 2, Per = 12, CatType = "Grp", Categories = ""):
   c = ISLines(FY, Per, CatType, Categories)
   return c.DefLines

I've been doing all my testing using the default arguments with this tal
tag;

<tr tal:repeat="item here/GetISLines">

I need to pass in the URL parameters but I can't figure out how to do it.

<tr tal:repeat="item here/GetISLines(request.FY)"> doesn't work.  Nothing
else I've tried works either.  How do you pass parameters to an external
function?


Thanks.

Joe Goldthwaite




More information about the Zope mailing list