I want to generate URL. The aim would be to generate something like that:
[[G8|https://www.w3.org/WAI/WCAG21/Techniques/general/G8]]
[[H96|https://www.w3.org/WAI/WCAG21/Techniques/html/H96]]

with G8 or H96 a input.

At first, I tried 

\define wcagTechUrl(ref)
<$set name="place01" filter="[[$ref$]prefix[G]then[general]]">
<$set name="place02" filter="[[$ref$]prefix[H]then[html]]">
<$set name="url" filter="https://www.w3.org/WAI/WCAG21/Techniques/ 
<<place01>> <<place02>> / $ref$ +[join[]]">
[[$ref$|<<url>>]] link to <<url>>
</$set></$set></$set>
\end

and this gives me that kind of things : bug-01.jpeg
* there is a G8 link but it links to #<<url>>
* the link outside of the "a" tag is treated as a link but only until 
"Techniques/" corresponding to the URL I added during the join operation.

I trie the following new code:

\define wcagTechUrl(ref)
<$set name="place01" filter="[[$ref$]prefix[G]then[general]]">
<$set name="place02" filter="[[$ref$]prefix[H]then[html]]">
<$set name="url" filter="https://www.w3.org/WAI/WCAG21/Techniques/ 
<<place01>> <<place02>> / $ref$ +[join[]]">
<$wikify name="urlw" type="text" text=<<url>> >
<<urlw>>
</$wikify>
</$set></$set></$set>
\end
\define wcagTech(ref) [[$ref$|<<wcagTechUrl $ref$>>]] vers <<wcagTechUrl 
$ref$>>

which I use thus: <<wcagTech G8>> and I get bug-02.jpeg
* the macrocall widget is no better that the simple macro calling, same 
result
* but the printed url is shown as a complete URL, that which I want, and 
redirect to that URL.

So, I'm really confused. the URL in the [[ | ]] link syntax is always raw, 
I can't use a macro or a variable to speicy it, which ruins my second 
attempts and similar tries. And my first try was also very strange.

Could a guru explain me waht's going on or how to do it properly please? 
Many thanks in advance!!!



but the result is that one

-- 
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 tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7f36c1ac-52df-40eb-9c6b-d9b641770b51n%40googlegroups.com.

Reply via email to