0

In my tiddler, I have the following field:

  • name : my_field
  • value : [[Some Page I Want To Link To]]

Then, in the same tiddler, I use the following ViewWidget to see the content of the file:

<$view field="my_field" />

The problem is that the rendered text is not wikified, and thus, there is no link despite me having wrapped the name with [[ and ]].

How can I do to have my text rendered as a proper link?

Note: Removing the spaces is not an option.

P.S.: Of course, I tried the documentation, that is:

... including changing the format, etc., but to no avail.

paercebal
  • 81,378
  • 38
  • 130
  • 159

2 Answers2

2

The solution is to use the transclude widget, instead of the view widget:

<$transclude field="my_field" />
paercebal
  • 81,378
  • 38
  • 130
  • 159
  • this worked for me with one drawback: markdown is ignored. E.g., lists of the format `* blabla` are not rendered as lists, but lists of the format `
    • blabla
    ` are rendered as lists. (markdown works fine in the original, non-transcluded tiddler).
    – Flo May 10 '16 at 21:31
  • adding `mode=block` solved this problem (see https://groups.google.com/d/msg/tiddlywiki/wVbBgHQs5qQ/Mu64zdUPVe8J) – Flo May 10 '16 at 21:44
0

If your field my_field has the value: Some Page I Want To Link To

Then use:

<$link to={{!!my_field}} >{{!!my_field}}
</$link>
S0S
  • 23
  • 3
  • Note that this can be abbreviated `<$link to={{!!my_field}}/>` -- the value of `to` will be used for the body if the body is empty. – Soren Bjornstad Mar 23 '21 at 16:58