-
member home page refactoring
last modified December 3, 2007 by magicbronson
magicbronson: RaFromBRC: i'm trying to make http://openplans/people/jtesty go to jtesty's profile by default, instead of whatever the value of getDefaultPage() is (currently 'jtesty-home').
RaFromBRC: magicbronson: the getDefaultPage stuff is a little older... it's related to the BrowserDefaultMixin subclass that the member folders (and most folderish objects we use) have in their subclass
[2:34pm] RaFromBRC: s/have in their/have as a/
[2:35pm] • magicbronson looks at BrowserDefaultMixin
[2:35pm] RaFromBRC: magicbronson: i think it gets set programmatically when the member folders are created, and then it kicks in and automagically becomes the default view for the folder
[2:36pm] RaFromBRC: magicbronson: we had this same issue w/ the project objects, when we switched to using the IHomePage adapter for deciding what the home page should be
[2:36pm] magicbronson: RaFromBRC: should we use an adapter here then?
[2:36pm] RaFromBRC: magicbronson: the adapter would make sense if we want to give people the choice of what their homepage should be
[2:36pm] RaFromBRC: magicbronson: if we're going to categorically define them to be the same, then it's probably overkill
[2:37pm] magicbronson: RaFromBRC: people are soon going to be able to have their own blogs...
[2:37pm] magicbronson: RaFromBRC: in which case we will want to give them the choice
[2:38pm] RaFromBRC: magicbronson: then, yes, IHomePage is how i would do it, for consistency's sake
[2:39pm] RaFromBRC: magicbronson: also, to be safe, we'll want to remove all of the 'setDefaultPage' and 'getDefaultPage' calls on the member folders, since that will win out over the z3 view based stuff
[2:39pm] RaFromBRC: magicbronson: you can see i had to do that for the projects: http://trac.openplans.org/openplans/changeset/11136
[2:39pm] magicbronson: RaFromBRC: right, thanks
[2:40pm] RaFromBRC: magicbronson: opencore.member.browser.miv module has an initializeMemberArea function, that's where it's getting set
[2:40pm] magicbronson: RaFromBRC: thanks
[2:40pm] RaFromBRC: magicbronson: we'll also probably need an upgrade widget, to unset the value for all of the existing member folders
[2:41pm] magicbronson: RaFromBRC: right. i will pair with rmarianski when he has a chance
[2:41pm] RaFromBRC: magicbronson: it'll be a pretty trivial upgrade, but it'll interfere w/ the IHomePage stuff until we run it
[2:43pm] RaFromBRC: magicbronson: in all the places where 'getDefaultPage' is used on a member home, you'll need to decide what to do
[2:44pm] RaFromBRC: magicbronson: in some cases you're really going to always want the wiki page... but in other cases you're going to actually want to use the IHomePage adapter to see what the current home page is
[2:44pm] magicbronson: RaFromBRC: right
[2:44pm] magicbronson: RaFromBRC: maybe i'll put this on a branch and then someone can look it over before it's merged to trunk
[2:45pm] RaFromBRC: magicbronson: sounds great... it's not much work, it's just small changes in a bunch of different places
[2:45pm] RaFromBRC: magicbronson: grep is definitely your friend here
[2:45pm] magicbronson: RaFromBRC: ok, thanks