[TW5] how to show tiddler in tm-modal with template?

124 views
Skip to first unread message

sini-Kit

unread,
Dec 30, 2016, 9:29:26 AM12/30/16
to TiddlyWiki

Hi! I try to make tm-modal and show there current tiddler with the template

 <$button class = 'onclean2' >
<$action-sendmessage $message="tm-modal" $param="SampleModal" yourName={{!!caption}}  yourMessage={{||3dsliderModal}} />
</$button>

but when I use  {{||3dsliderModal}} it shows nothing 
I think it's because   SampleModal has field subtitle:<<yourMessage>>

is it possible to use {{||3dsliderModal}} in modal?

Jeremy Ruston

unread,
Dec 30, 2016, 10:46:43 AM12/30/16
to tiddl...@googlegroups.com
Hi Sini-Kit

One problem is with this part:

yourMessage={{||3dsliderModal}}

Transcluded attributed are never wikified; the text is passed through directly, and so the double bar syntax is not used with transcluded attributes.

If I understand your goal correctly, you’ll need to pass the current tiddler explicitly to the modal:

<$action-sendmessage $message="tm-modal" $param="SampleModal" currentTiddler=<<currentTiddler>>/>

Then your modal can pick up the caption field and other values that you are displaying.

Best wishes

Jeremy

and so don’t need to resolve the value of the current tiddler.

--
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+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/7d7ecf4a-cde3-47e6-9afb-237a98e7e660%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

sini-Kit

unread,
Dec 30, 2016, 11:00:30 AM12/30/16
to TiddlyWiki
Thank you Jeremy I solve this problem by little code  in SampleModal . it works good


\define imgmod()
{{$(name)$||3dsliderModal}}
\end


<$set name="name"  value=<<yourMessage>> >
<<imgmod>>
</$set>



пятница, 30 декабря 2016 г., 18:46:43 UTC+3 пользователь Jeremy Ruston написал:
Reply all
Reply to author
Forward
0 new messages