I think your code can be simplified a little. The problem is the way that
you're using the trick of not using a state tiddler with the reveal widget.
In this particular case, you are actually addressing a state tiddler, so
it's better to use the intended mechanism.
\define handleRedirects()
<$reveal state="$:/.tb/config/Redirected-tb5##$(currentTiddler)$"
type="nomatch" text="">
<div class="redirected">
moved to {{$:/.tb/config/Redirected-tb5##$(currentTiddler)$}}
</div>
</$reveal>
\end
<<handleRedirects>>
Best wishes
Jeremy.
On Sun, Dec 7, 2014 at 9:13 PM, Tobias Beer <[email protected]> wrote:
> Hi Jeremy,
>
>
>> Perhaps you could just have a macro call in the DataTiddler?
>>
>
> Sure, that'S definitely more flexible, but it's somewhat similar to using
> "moved to" in the sense that I have to overload that DataTiddler with
> markup that it doesn't really ask for.
>
> As for these codebits, I guess there was an error in it...
>
> \define getIndex() {{$:/.tb/config/Redirected-tb5##$(currentTiddler)$}}
> <$reveal type="nomatch" default="" text=<<*getIndex*>>>
> <div class="redirected">
> moved to <$transclude tiddler="$:/.tb/config/Redirected-tb5" index=<<
> currentTiddler>>/>
> </div>
> </$reveal>
>
> It should have been *text=<<getIndex>>* instead of *text=<<redirect>>*,
> but I guess you figured that.
>
> I'm not sure about this, but maybe you can use the view widget. It
>> fallbacks to its content if the field it has to show is not defined.
>
>
> Not sure that helps as I don't want any fallback content, except nothing,
> but rather enhance the output with some common prefix / suffix, so Jeremy's
> macro seems to be the way to go, even if it's just called *<<r "Old Foo
> Tiddler">>*, as in...
>
> title: $:/.tb/config/Redirected-tb5
> type: application/json
>
> {
> "New Foo Tiddler": "<<r [[Old Foo Tiddler]]>>"
> }
>
> Obviously, what I'd like to use is simply...
>
> title: $:/.tb/config/Redirected-tb5
> type: application/json
>
> {
> "New Foo Tiddler": "Old Foo Tiddler"
> }
>
> Best wishes, Tobias.
>
--
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/d/optout.