forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Re: [CONTRIB] auto generation of menus
Date Mon, 06 Oct 2003 06:47:42 GMT
On Fri, Oct 03, 2003 at 11:12:04PM +0200, Eric BURGHARD wrote:
> Hi,
> I've made some modifications to directory2book.xsl (which generate side menu 
> based on directory content):
> -little cleanup (expected-extension argument no more needed)
> -kind of control on which items are present or not
> -allow parametrable sorting of menu-items
> -easily extensible.

Nice.  I've committed it with some modifications:

 - Used the existing pathutils.xsl instead of substring-last.xsl
 - I didn't understand the purpose of documentdirectory.xsl, so I put its
   enhanced get-label template in directory2book.xml.  Any reason to
   separate it out, other than to demonstrate its 'overridability'?

Sorting by XPath is a good idea, but ordering still doesn't seem flexible
enough for ordinary sites.  Perhaps we need another transformer that sets
a <meta name="order"> field based on some clever algorithm:

<map:generate src="content/xdocs/{1}" type="xpathdirectory"/>
<map:transform type="sorter"/>
<map:transform src="resources/stylesheets/directory2book.xsl"/>

Then pages could have some metadata used by the sorting algorithm:

<meta name="group">GettingStarted</meta>

<meta name="comes-after">index.html</meta>

<meta name="comes-before">primer.html</meta>


View raw message