Hi Mike

Going back to your original question, consider the example you gave:

<a href="mailto:<$view field="email">">click to email</a>

At the moment, that doesn't work because the double quotes on the href
attribute cause the value to be interpreted as a literal string. The docs
point out that we also support quoting attribute values with double curly
braces (for transclusion) and double angle brackets (for macro invocations).

We could also support a quote symbol that caused the attribute value to be
parsed as wikitext and rendered. For example, using quadruple round
brackets for illustration:

<a href=((((mailto:<$view field="email">))))>click to email</a>

The reason originally that I didn't support something like that format is
because it felt like it led to overly complex symbol soup (which is a
frequent danger for TW5). I felt that the macro syntax offered a way to
simplify things by allowing the gobbledegook needed for the attribute value
to be packed up into a neat named macro definition.

Anyhow, supporting element attributes in wikitext remains an option.

Also, it's worth mentioning that TW5 will support global macros soon.

Aaaah, this is maddening. It's so close.


I'll try to work through the examples, but appreciate your feedback.


> Suppose I create a tiddler with the fields:
> x = mike
> email = {{!!x}}
> then, amazingly,
> {{!!email}} displays "mike"
>

Transclusion wikifies the transcluded tiddler field value.


> and, weirdly,
> <a href={{!!emai}}>link</a> creates a link to "{{!!x}}". hmm.
>

Transcluding an element attribute value currently does not wikify the
transcluded tiddler field value.


> even weirder, changing the email field to be
> email = mailto:{{!!x}}
> then
> {{!!email}} displays "mailto:{{!!x}}";
> and, weirdly,
> <a href={{!!email}}>link</a> creates a link to "mailto:{{!!x}}";.
>

Subtly, what's going on here is that TW5 is wikifying the text
"mailto:{{!!x}}";,
and it sees the "mailto:"; part as the start of a mailto URI. It treats the
text up to the closing curly braces as part of the literal mailto URI, and
so never sees the transclusion.


> There is some crazy stuff going on between the TW parser and the rendering
> engine that I'm not following.


Hopefully that clarifies the present situation a little.

I think we need to add ways to explicitly specify whether the target text
of a transclusion or macro invocation is to be wikified or not. There are
situations where both are required.

Best wishes

Jeremy




On Mon, Feb 3, 2014 at 8:17 PM, Julie <[email protected]> wrote:

> Le lundi 3 février 2014 15:26:15 UTC+1, Mike a écrit :
>
>> The <$view> widget claims it supports templates, but I couldn't get it to
>> work.
>>
>
>  Not really... the ViewWidget claims that it supports templates *with
> certain formats*, and in the formats list only the date format seems to
> work with a template.
>
> --
> 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 http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to