[Moin-user] Elegant way to move user pages to subdirectory?

Marcin Kasperski Marcin.Kasperski at softax.com.pl
Fri Jan 26 08:05:06 EST 2007

> > Now, to the subject. What is the 'elegant' way to move
> > personal pages to the subdirectory (say 'Personal' or
> > 'Users') - so instead of having http://my.host/mywiki/Johnny
> > I would have http://my.host/mywiki/Users/Johnny.
> There is no easy way to do that. Moin really expects username
> == pagename for the user homepage.


Maybe note why I see a problem here: it happens, that usernames 
conflict with natural names of 'main content' pages. 
Another is that they are more difficult to omit while searching 
for orphans, wanted pages, etc.

> Of course one can hack to code to use Users/UserName, but that
> has quite some consequences, because this is used at quite
> some places: * @SIG@
>  * RecentChanges
>  * last edit info at bottom of page
>  * action=info
>  * (maybe more)

This 'maybe' looks most terrifying. And I hoped to limit the 
changes to the theme, but it seems that patching moinmoin itself 
would be necessary (hmm, friendly grep quickly shows that 
wikiutil.getInterwikiHomePage is used directly in 6 places) not 
counting subroutines that call subroutines :-(

> What it does is looking up the wikiname you configure there in
> the interwiki map and then construct a interwiki link, so that
> could maybe work, just try making a new interwiki map entry
> like:
> UserHome http://yourserver/mywiki/Users/
> > (note: I would like to keep backups kept nevertheless, so
> > faking url using interwiki is not an option!).
> 1.6 will have a better way than those /MoinEditorBackup, but
> for 1.5 you are right (it won't do backups).

Yeah, I just found this:

    def _make_backup(self, newtext, **kw):
        if homepage[0] != 'Self': # user has a remote homepage
            return None

Now I am contemplating patching this routine somehow....

> > If not, what could be the most elegant way?
> Maybe just doing it the "normal" way? :)

Reasons for which I do not like the current approach are quoted 

> > Also (predicting necessary rename once I achieve this), does
> > there exist easy way to find all the user pages?
> CategoryHomePage maybe?

It counts on users to add this marker... Some solution, but not 
the perfect one.

Thanks for the hints.

More information about the Moin-user mailing list