[dokuwiki] Re: Patch submission : allow user-defined namespaces/pages order in the index

On Tue, Jun 16, 2009 at 06:17:10PM +0200, Matthieu.Rioteau@xxxxxxx wrote:
> Hi everybody,

Hi,

> Just subscribed the mailing list so I can submit a patch to you.
> 
> The goal of the patch is that user can choose the order in which 
> namespaces and pages are displayed in the index.
> 
> The behavior is very simple :
>  - To define namespaces order : place in the namespace in which namespaces 
> order shall be changed a file named ".user_order_dirs"
> In this file, place in the order you want it to appear the list of 
> namespaces - i.e. directories -  (one per line). Non-existing namespaces 
> will be ignored, remaining namespaces will be added alphabetically at the 
> end of the user list.
> Repeat this process in all concerned namespaces.
>  - To define pages order : place in the namespace in which pages order 
> shall be changed a file named ".user_order_files"
> In this file, place in the order you want it to appear the list of pages - 
> i.e. files -  (one per line, and with the ".txt" extension). Non-existing 
> pages will be ignored, remaining pages will be added alphabetically at the 
> end of the user list.
> Repeat this process in all concerned namespaces.

DokuWiki comes with a very sophisticated event mechanism which allows to
modify/replace almost every default behaviour of the Wiki by writing an action
plugin. So, rather than implementing this in the core, I think this would be
better done as an action plugin, so, people who need this kind of functionality
can just install it while people who are fine with the default index sortorder
don't. The event to use here would be TPL_ACT_RENDER.

Kind Regards,
        Michael

-- 
Michael Klier

www:    http://www.chimeric.de
jabber: chi@xxxxxxxxxxxxxxxxxx
key:    http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551

Other related posts: