[albatross-users] Wiki example and related extension: iterate over ctx/session

Andrew McNamara andrewm at object-craft.com.au
Tue Jul 8 14:27:16 EST 2003


>> Perhaps the SessionBase ctor could do:
>> 	self.locals.__session__ = self.__vars
>> so your templates could do
>> 	<ul><al-for iter="k" expr="__session__.keys()">
>> 		<li><al-value expr="k.value()"/></li>
>> 	</al-for></ul>
>
>"ctor" ???
>Do you mean the "creator" method? (i.e. __init__ for the class)

"ctor" is shorthand for constructor, so, yes.

>I wonder what I would break in my current app by upgrading to the 1.10 
>prerelease right now. I do like David Cole's "kludge" a bit better, since 
>it doesn't require me to override or change code in the basic albatross 
>code. <shrug>

Well, we'd like to know what will break so we can fix it before the
release... that's the point of a -pre, although you might not want to
use it in production. 8-)

Dave's suggestion is pretty gross. I wonder if we should put a
session_vars() method on the context that returns a list of session vars?

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/



More information about the Albatross-users mailing list