[tw5] Re: Create New Tiddler contains Wikified Value

2018-08-05 Thread FrD
Hi Eric,

Short and efficient !!!
Thanks for the tip.

Regards

FrD

Le dimanche 5 août 2018 16:22:42 UTC+2, Eric Shulman a écrit :
>
> 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=<>/>
>> 
>> \end
>>
>> <$button actions=<>>
>> Create
>> 
>>
>
> 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=<>>Create
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/025a5718-19b6-4b2b-931b-1751561282da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create New Tiddler contains Wikified Value

2018-08-05 Thread Mohammad
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=<>/>
>> 
>> \end
>>
>> <$button actions=<>>
>> Create
>> 
>>
>
> 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=<>>Create
>
> 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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/ea32a67f-d075-49aa-b1c4-e470fefea01d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create New Tiddler contains Wikified Value

2018-08-05 Thread Eric Shulman
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=<>/>
> 
> \end
>
> <$button actions=<>>
> Create
> 
>

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=<>>Create

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 tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/d244b2b9-960b-4bfa-80fc-e5cc48e0b711%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create New Tiddler contains Wikified Value

2018-08-05 Thread Mohammad
Hello FrD,
 Thank you! your solution works!

Cheers
*Mohammad*

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/ce0cb71d-2ec8-44d1-a770-0bbe8d95df25%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[tw5] Re: Create New Tiddler contains Wikified Value

2018-08-05 Thread FrD
Hi,

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=<>/>

\end

<$button actions=<>>
Create




Regards

FrD

Le dimanche 5 août 2018 06:39:59 UTC+2, Mohammad a écrit :
>
> Assume you want to create a tiddler inside it put some wikified values like
>
> <$button>
> <$action-createtiddler $basetitle="myTiddler" tags="myTag" text="This is a 
> text based on {{!!title}}"/>
> Create
> 
>
> Here the the button is in a tiddler titled parent, and the text in the 
> newly created tiddler shall be
>
> This is a text based on parent
>
>
> Note in the new tiddler we have not {{!!title}} but we have parent
>
> What is the shortest solution, do we need wikify widget?
>
> Mohammad
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/60cac22a-b4b7-4dbd-908a-08cbcc7d3aa5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.