Hi! The script to split the page is almost ready, I just now have to find a way to define multiple TOCs. ... some work later I've patched english/template/debian/toc.wml (and english/users/index.include) to make it work. Looks really great! If you like to use multiple TOCs in one page you just have to add #include wml::debian::toc that often, with an added TOCNAME=foo in that line, use <toc-displayfoo>, <toc-add-entryfoo> and <toc-title-formattingfoo> respectively. Pages not defining TOCNAME are not affected by this change. Each different TOC should have its own name of course, change foo to bar in each of these statements accordingly. Please find attached my suggested patch for these pages and the split.pl script that will generate a index-splitted.wml file out of the current one and move the entries into their corresponding subdirectories. It currently does NOT add the translation-check header, please stay tuned for that. I won't commit/split/change the page before this is done, of course. While testing with my split script I noticed two entries: GuadaWireless and GULAlcarria. They just have a different #name, different link and title, but are the same text in the entry (I noticed this just because the splitted files are sorted alphabetically and thus are reversed in my generated file :). I'm not sure if that is on intention, if there was a problem or something else, that should be looked at, I guess. So long, Alfie -- use Mail::Signature; $sig = Mail::Signature->new; print $sig->random;
Attachment:
split.pl
Description: Perl program
? english/users/index-splitted.include ? english/users/split.pl Index: english/template/debian/toc.wml =================================================================== RCS file: /cvs/webwml/webwml/english/template/debian/toc.wml,v retrieving revision 1.6 diff -u -r1.6 toc.wml --- english/template/debian/toc.wml 8 Jul 2003 20:51:14 -0000 1.6 +++ english/template/debian/toc.wml 28 Jul 2003 12:20:18 -0000 @@ -1,25 +1,25 @@ <set-var toc:_cnt=0 /> -<define-tag toc-add-entry endtag="required"> +<define-tag toc-add-entry$(TOCNAME) endtag="required"> <preserve name /> <preserve href /> <set-var %attributes /> <ifeq <get-var name /> "" "<increment toc:_cnt /> <set-var name="l<get-var toc:_cnt />" />" /> -<toc-title-formatting><a name="<get-var name/>"<when <get-var href />> href="<get-var href />"</when>>%body</a></toc-title-formatting> -{#ToC_questions#: <li><a href="#<get-var name/>">%body</a></li> +<toc-title-formatting$(TOCNAME)><a name="<get-var name/>"<when <get-var href />> href="<get-var href />"</when>>%body</a></toc-title-formatting$(TOCNAME)> +{#ToC_questions$(TOCNAME)#: <li><a href="#<get-var name/>">%body</a></li> :##} <restore name /> <restore href /> </define-tag> # May be locally redefined -<define-tag toc-title-formatting endtag="required" whitespace="delete"> +<define-tag toc-title-formatting$(TOCNAME) endtag="required" whitespace="delete"> <h2>%body</h2> </define-tag> -<define-tag toc-display> +<define-tag toc-display$(TOCNAME)> <ul> -{#ToC_questions#} +{#ToC_questions$(TOCNAME)#} </ul> </define-tag> Index: english/users/index.include =================================================================== RCS file: /cvs/webwml/webwml/english/users/index.include,v retrieving revision 1.3 diff -u -r1.3 index.include --- english/users/index.include 21 Nov 2002 14:03:33 -0000 1.3 +++ english/users/index.include 28 Jul 2003 12:20:18 -0000 @@ -1,4 +1,8 @@ -<define-tag userdetail whitespace=delete endtag=required> - <h3><a name="%0"<if %2 " href=\"%2\"" />>%1</a></h3> +<define-tag toc-title-formatting$(TOCNAME) endtag="required" whitespace="delete"> + <h3>%body</h3> +</define-tag> + +<define-tag userdetail$(TOCNAME) whitespace=delete endtag=required> + <toc-add-entry$(TOCNAME) name="%0"<if %2 " href=\"%2\"" />>%1</toc-add-entry$(TOCNAME)> %body </define-tag>
Attachment:
pgpjpTqco1Dnl.pgp
Description: PGP signature