Hi 

I have been experimenting -- the <$mangletags> widget can be used to create 
a simple search and replace along with a <$list> widget:

<ul><$list filter="[tag[tag-to-replace]]">
<$mangletags find="tag-to-replace" add="tag-to-substitute">
<li><$button message="tw-mangle-tags" 
class="btn-invisible">{{!!title}}</$button></li>
</$mangletags></$list></ul>

Is there any way to automate the generation of the widget message in such a 
way that all of the substitutions will take place with a single button 
press? 

regards

On Friday, May 30, 2014 2:13:12 PM UTC+2, Danielo Rodríguez wrote:
>
> Wow!
>
> Another piece to the stack! Glad to see you so busy. Thank you for all 
> your widgets. Currently I have no need to try it out, but I will keep it in 
> my mind.
>
> Regards
>
> El viernes, 30 de mayo de 2014 12:40:51 UTC+2, Matabele escribió:
>>
>> Hi
>>
>> I have added another widget at: http://gwiz.tiddlyspot.com/
>>
>> I needed to modify the tags in the template and the <$maketid> widget 
>> overwrites the tags in the template tiddler. Whilst it is possible to do 
>> this in some contexts with the <$fieldmangler> widget, the parameter to the 
>> message is used to specify the tag, and according to my stacking mechanism, 
>> the title of the target tiddler should be propagated with the parameter to 
>> the message. Thus a whole new <$mangletags> widget and an associated 
>> "tw-mangle-tags" message (to avoid confusions with the widget messages 
>> associated with the <$fieldmangler> widget.)
>>
>> The <$mangletags> widget can be stacked around a button widget and can do 
>> any of the following:
>>    -- append a tag to the tags field of the target tiddler
>>    -- find and remove a tag from the tags field of the target tiddler (if 
>> present)
>>    -- find and replace a tag from the tags field of the target tiddler 
>> (if present)
>>    -- send a different widget message.
>>
>> The unfamiliar attributes are 'add=' and 'find='
>>    -- to add a tag, use only: add="tag-to-add"
>>    -- to remove a tag, use only: find="tag-to-remove"
>>    -- to find and replace a tag use: find="tag-to-be-replaced" and 
>> add="tag-to-substitute"
>>
>> Hope this is of use -- there is a demo on the site to show what the 
>> widget does. The logic is a little complicated -- hope my code works in all 
>> contexts :-)
>>
>> regards
>>
>

-- 
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to