Re: [Rest2web-develop] Ordering page and subsection links
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2008-12-18 13:16:49
|
Hello Andrew, That seems like a reasonable suggestion - thanks for the patch. It will have to wait until I have finished my book before I get a chance to apply it I'm afraid. Michael Andrew Ittner wrote: > I noticed that the links from the print_details macro would appear in random > order. This code change sorts them by default. > > Should this perhaps be an option (sort=True) on print_details? > > Andrew Ittner > > Index: rest2web/functions.py > =================================================================== > --- rest2web/functions.py (revision 248) > +++ rest2web/functions.py (working copy) > @@ -457,7 +457,8 @@ > if pages and do_pages: > print page_title > entries = [] > - for page in pages: > + > + for page in sorted(pages): > val = link % (page[0], page[1]) > if do_description: > val += description % page[2] > @@ -467,7 +468,7 @@ > if subsections and do_subsections: > print subsection_title > entries = [] > - for page in subsections: > + for page in sorted(subsections): > val = link % (page[0], page[1]) > if do_description: > val += description % page[2] > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > -- http://www.ironpythoninaction.com/ |