Many Thanks Eric!
Now I can have a smaller and cleaner code!
*Mohammad*
On Sunday, August 5, 2018 at 6:52:42 PM UTC+4:30, Eric Shulman wrote:
>
> On Sunday, August 5, 2018 at 5:27:30 AM UTC-7, FrD wrote:
>>
>> I may have a solution, not sure it's the smallest or the smartest ; and
>> it uses the wikify widget.
>> \define actions()
>> <$wikify name=tt text="This is a text based on {{!!title}}">
>> <$action-createtiddler $basetitle="myTiddler" tags="myTag" text=<<tt>>/>
>> </$wikify>
>> \end
>>
>> <$button actions=<<actions>>>
>> Create
>> </$button>
>>
>
> In this particular use case, since the reference is to the current tiddler
> title, you can use the "currentTiddler" variable, rather than having to
> transclude the title field of the tiddler.... and, since the actions are
> defined in a macro, you can use the $(currentTiddler)$ *macro substitution"
> syntax to insert the actual title text. Something like this:
>
> \define actions()
> <$action-createtiddler $basetitle="myTiddler" tags="myTag" text="This is
> a text based on $(currentTiddler)$"/>
> \end
> <$button actions=<<actions>>>Create</$button>
>
> enjoy,
> -e
>
>
>
--
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/ea32a67f-d075-49aa-b1c4-e470fefea01d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.