Alright, I have a less-ugly workaround: change': <dtml-var standard_html_header> -to- <dtml-with "getportal()"> <dtml-var standard_html_header> </dtml-with getPortal> And it seems to work.