[Rest2web-develop] rest2web - Latest Changes
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2005-07-25 07:30:52
|
Hello Dirk, Can you use SVN ? The latest version now has three fixes : ``minibar`` function now follows the section-list order. Fixed bug where ``thispage`` could be ``None``. Added a tags keyword. The ``thispage`` problem was indeed a bug. My original implementation (that found ``thispage`` in the indextree structure) was a bit of a hack that appeared to work fine. These things always come back to bite you. It appears to work better now ;-) I've also changed the ``minibar`` function to follow the order of sections specified. I haven't yet implemented a way of specifying the page order. My favoured way of doing this is turning the indextree into an ordered dictionary - but I haven't yet implemented it ! I'd like a solution that also works for the ``sidebar`` function. Best Regards, Fuzzyman Dirk Steenpass wrote: >Dear Fuzzyman, > >thanks for your quick reply and apologies for my late answer. > >I see the point of not specifying everything because pages are generated >dynamically. I could use templates for pages when I want an ordered >sidebar menue. However, I'm a lazy guy and I would like to get away >using as few templates as possible. I am thinking about introducing an >additional restindex variable 'page-order', that get's evaluated if >present. Similar to 'section-list' 'page-order' has a meaning on index >pages only. I will probably take a look into this tomorrow ... > > >The 'thispage' question: I tried to say the following: > >root_dir/ > index_page <- thispage != None > > subdir/ > index_page <- thispage != None > page_1 > page_2 > > subdir/ > index_page <- thispage == None > >In words: the 'thispage' variable is None for index pages that are leaves >of the indextree. As index pages are treated special several times I was >wondering whether this is a bug or a feature. > >best regards, dirk > > >On Sun, Jul 10, 2005 at 08:26:15AM -0700, root wrote: > > >>>On Sun, 10 Jul 2005 01:20:43 0200 Dirk Steenpass <ste...@sd...> >>> >>> >>wrote. >> >> >>>Dear Mr. Foord, >>> >>>I have recently discovered rest2web (via ReStructuredText >>>documentation). I really like the rest2web idea, as I am sick of >>>writing plain html and a full blown content managment is an overkill for >>>my needs. >>> >>>I would like to bother you with a few questions about rest2web 0.3.0 >>>hoping that your answers save me from code diving ;-). >>> >>> >>> >>> >>Hello Dirk, >> >>I'm glad that you might find rest2web helpful - and I'd be very pleased to >>answer your questions about it. >> >>I'm away in Romania for the next week - so some of your questions I might >>have to investigate when I return. >> >> >> >>>When using minibar, is there a way to control the order of pages within >>>a section? >>> >>> >>>When using minibar, is there a way to control the order of sections? It >>>seems that the order of section specifications is not honored? >>> >>> >>> >>Not currently - although honouring the order they are specified in seems a >>very sensible idea. You can see the code in the minibar function in (I >>think) the file ``functions.py``. >> >>The reason I didn't add too much code to specify the position of everything >>is that it's supposed to be dynamic - you're supposed to be able to add >>whole sections *without* having to specify where they go. Otherwise you >>might as well just put the links in the template yourself ! >> >>However - your idea is a good one. When I can look at implementing it. It >>should be quite easy. >> >> >> >>>The 'thispage' value is not None for every page that is build, with the >>>exception of index pages that are leafs of the indextree. Is this is a >>>bug or a feature? >>> >>> >>> >>I don't fully understand the question - and I'm not able to test. 'thispage' >>*shouldn't* be None as it's a pointer to the current page in the 'indextree' >>structure. >> >>Are you saying that I document it as being None - or that *sometimes* it is >>None ? >> >>Best Regards, >> >>Fuzzyman >> >> >> >> >> >> >>> >>>bis denn, dirk >>> >>> >>> >>> > > > |