[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

users page split update



        Hi!

 Please find attached my current working version for the splitted users
page. I've found out about how the devel/todo page does insert only one
entry, and tried to apply it. There is just one problem:

 The <toc-add-entry> tag gets executed before the diversion takes effect
and thus the entry is added twice to the toc list....

 I'm out of ideas here, help would be appreciated quite well.

 There is one more smaller problem, the thing with the url doesn't work:
If I leave it the current way the href doesn't appear anywhere, if I
remove the space before the <when like it is in the
template/debian/toc.wml for the title-formatting tag the href and url
gets added _inside_ the name tag, like
<a name="Bond href="http://www.bond.edu.au/"";> ....   Stupid thing, is
this buggy or is this "feature" documented somewhere?

 So long, maybe someone can share some thoughts/ideas/efforts.
Alfie
-- 
use Mail::Signature;
$sig = Mail::Signature->new;
print $sig->random;

Attachment: split.pl
Description: Perl program

<define-tag toc-title-formatting$(TOCNAME) endtag="required" whitespace="delete">
  <h3>%body</h3>
</define-tag>

<define-tag userdetail$(TOCNAME) whitespace=delete endtag=required>
<preserve id description url />
<set-var %attributes />

{#!TODO<subst-in-string <get-var id /> "([^a-zA-Z0-9_])" "_" >OUT#:
<toc-add-entry$(TOCNAME) name="<get-var id />"<when <get-var url />> href="<get-var url />"</when>><get-var description /></toc-add-entry$(TOCNAME)>
%body
:#TODO<subst-in-string <get-var id /> "([^a-zA-Z0-9_])" "_" >OUT#}

<when <not <get-var useritem:<subst-in-string <get-var id /> "([^a-zA-Z0-9_])" "_" >/>/>>
   # Insert only once
   {#TODO<subst-in-string <get-var id /> "([^a-zA-Z0-9_])" "_" >OUT#}
   <set-var useritem:<subst-in-string <get-var id /> "([^a-zA-Z0-9_])" "_" >=1 />
</when>

<restore id description url />
</define-tag>

# vim:ft=wml:

Attachment: pgpN8Tct1Ioiq.pgp
Description: PGP signature


Reply to: