On Wednesday, 9 January 2019 22:07:09 UTC+1, TonyM wrote:
>
> Joe,
>
> Some mussings that may help your learning path.
>
> Just to keep it clear {{Tiddler}}
> Means transclude Tiddler, by default the text field. You could transclude 
> the content of fieldname as well eg {{Tiddler!!fieldname}}
>
> Whilst calling this transclusion we often refer to as "text reference" 
> because it references other text "in line". Commonly used for storing a 
> tiddller containing a state of something, it also allows you include one or 
> a set of predifined actions into the actions parameter, and thus can work 
> as reusable code/actions.
>
> When you transclude something in something else it clearly gets replaced 
> before the widget or wiki text is interpreted, and usualy itself 
> interpreted before hand. So if you transcluded a tiddler containing a list 
> widget in wikitext it would tranlate into a list as wikitext is want to, 
> but not in a parameter, allowing the widget to act on the parameter.
>
> You can also include actions inside 
> <$button parms>
> Zero or more Action widgets as in your example
> Button text or image
> </$button>
>
> But the above model with action widgets inside buttons supposed to be 
> avoided, which I do not like as it can sometimes make it harder to read 
> your own code since actions parameter points to somewhere else.
>

I didn't quite understand the last sentence.

I think you're saying that style A is better than B

where A is

     <$button actions = {{{Tiddler}}} > Text </$button>

and B is
      
      <$button>
           Actions
      </$button>

To my eye A is better in the sense that less verbose = good

It might be that B is better since you only have to read one tiddler code
to understand what's going on and if you have no intention of reusing the
action code it makes sense to put everything in one place.

Is their a recommended best practise?

Cheers

/Joe

Cheers

/Joe


    



 

> Enjoy
> Tony
>
>

-- 
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/fb1e0e87-f79b-45e5-bf50-18520723950a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to