Just a general suggestion;

When providing a large number of links to similar resources on the same 
external website/wiki I personally construct links based on the html a 
element. The key reason is we have access to the target parameter.

You still use similar techniques to create the links but the result can be 
something like this;

<a href="https://www.w3.org/WAI/WCAG21/Techniques/general/G8"; 
*target=w3.org*>G8</a>
<a href="https://www.w3.org/WAI/WCAG21/Techniques/html/H96 
<https://www.google.com/url?q=https%3A%2F%2Fwww.w3.org%2FWAI%2FWCAG21%2FTechniques%2Fhtml%2FH96&sa=D&sntz=1&usg=AFQjCNGuK77XV7w01iiAmgYoLVtQ6reYdQ>"
 
*target=w3.org*>H96</a>

The key advantage is it keeps opening in the same tab/window rather than 
opening too many tabs/windows, yes one replaces the other but this can be 
appropriate.

Regards
Tones

On Monday, 21 September 2020 08:30:48 UTC+10, Jean-Pierre Rivière wrote:
>
> 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 
> <https://www.google.com/url?q=https%3A%2F%2Fwww.w3.org%2FWAI%2FWCAG21%2FTechniques%2Fhtml%2FH96&sa=D&sntz=1&usg=AFQjCNGuK77XV7w01iiAmgYoLVtQ6reYdQ>
> ]]
>
> 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/e2334fc2-0942-4a27-bf46-dfdf5553ae6bo%40googlegroups.com.

Reply via email to