Following my previous question, I have been able to fully uderstant what
answers I got. Thanks again for your help.
I'm now able to define a macro for transcluding a wikified tiddler as I
wish, but this macro must have the required html within its code. A better
alternnative would be to use a template, a I was suggested.
The templates I saw use the view gadget. The view gadget is unable to
translate a wiki contents into html and as such it is useless for me.
The transclude widget does that. But my macro already uses it, with a
prescription of a template, so the template has not to use a transclude
widget. If I understand the mechanism correctly, the view gadget (of the
template) would import ra<w wiki contents that the transclude widgety (of
the macro) would interpret.
But alas... it does not seems to work.
So here's my attempts. I'm using the latest tw5 5.1.22 (BTW I can't find a
way to get the version number of a single file tiddlywik, besides $:/built
which doesn't ?):
1) tiddler "$:/templates/ImportantTip", not tagged:
<aside class="tip-block"><div class="tip-icon">{{$:/core/images/tip}}</div>
<$view tiddler=<<currentTiddler>> field="text"/></aside>
2) tiddler "tipper" tagged "$:/tags/Macro":
\define !tip(tiddler)
<$tiddler tiddler="$tiddler$"><$transclude mode="block"
tiddler="$:/templates/ImportantTip"/></$tiddler>
\end
\define !tipDirect(tiddler)
<$tiddler tiddler="$tiddler$">
<aside class="tip-block"><div
class="tip-icon">{{$:/core/images/tip}}</div><$transclude
mode="block"/></aside></$tiddler>
\end
3) tiddler "tip" not tagged (tw5 content type):
This is a //wiki// content much ''important'' for this [[project]]!
4) tiddler "testing" not tagged:
!! direct inclusion without template
<<!tipDirect "tip">>
!! inclusion with template
<<!tip "tip">>
Results: The "testing" tiddler is rendered thus (parenthesis are my
description of what you get, in case you see only undecorated text):
*direct inclusion without template* (written as a title)
This is *wiki* content much *important* for this project <http://#project>!
(with "wiki" in italics, "important" as bold and "project" as a wiki link:
that's perfect!)
*inclusion with template* (written as a title)
This is a //wiki// content much ''important'' for this [[project]]!
(that's the raw wiki text: failure)
(note: the tip icon is seen for both transclusions, proof that they really
happened)
I have no problem with adding my css style the tw5 way. My problems really
are about the final html output.
What error did I do?
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/04154a0c-5144-4a4d-8311-0cfa257e60fe%40googlegroups.com.