Hi all

This is going to be hard for me to explain. So bear with me. 

1. I am creating a long tiddler to be exported as static html.
2. The tiddler will use anchor id's so the user can navigate to sections of 
the tiddler.
3. I am using a list filter that transcludes the tiddlers based on a tag, 
and sorted by the contents of their 'id' field. Before the transcluded 
tiddler text is the tiddler title, wrapped in a header 1 class, with an 
anchor id pulled from the id field.

<$list filter="[tag[entry]sort[id]]"><hr><h1 id={{!!id}}><$view 
field="title"/></h1><hr><$transclude mode="block"/></$list>


4. The id fields contain the anchor id (e.g., #00.02) so the id's are added 
to the h1 (I use h1 because the CSS I use tells the printer to insert a 
page break at h1)

5. Up to now, I have been hand creating links to the id's into a table of 
contents.

<a href="##00.02">XXX</a>


So far, so good. Now here is the problem:

6. I want to replace my hand-crafted toc with an automated one, that 
contains links to the anchor id's.

I tried this:

<$list filter="[regexp:id[00.]sort[id]]"><a href="{{!!id}}"><$view 
field="title"/></a><br></$list>


But the problem is the <a href="{{!!id}}"> part. I need it to have two 
hashtags, because for links to anchors within a tiddler to work, the links 
have to have two hashtags. I tried the link widget too, and I can't get 
that to work, either.

So my question is: is there a way to replace <a href="{{!!id}}"> with 
something that adds a # before the id, so that the #00.02 becomes ##00.02?

Thanks for any help you can give.

Dave

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/97d79520-9491-44ca-87b3-f2ad278045b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to