[Zope] DTML to ZPT code question

Allen Schmidt aschmidt at fredericksburg.com
Tue Dec 28 12:39:11 EST 2004


<dtml-if "fredsession.getsessionuser()!='no session'">
	Hello, <dtml-var "fredsession.getsessionuser()">
	(<a href="/fredsession/logout?return_to_page=<dtml-var "_.string.split(URL,'//')[1]" missing="index_html" null="index_html">
		<dtml-if QUERY_STRING>?<dtml-var QUERY_STRING></dtml-if>">   click here to logout</a>)

...other stuff if logged in...

</dtml-if>


I have only started looking at the page that has this code to convert to ZPT (of which I am really starting to enjoy) but wondered if anyone had a quick example of how to handle the splitting of the URL in a TAL statement and the forming of the href attribute of that anchor tag.

I have looked through all the docs I can find and no clear examples of this situation jump out at me. 

Thanks for the help if anyone has time.

Allen




More information about the Zope mailing list