>
> That syntax looks a bit frightening, I'd much rather prefer something
> like...
>
> \define pb(url)
> <img src="http://s1178.photobucket.com/user/foo/$url$";>
> \end
>
> and then use...
>
> <<pb cat.jpg>>
>

That works too. The only advantage of the formulation I used above is that
the same macro can be used to reference images or make links.


> By the way, what's with the brackets? Do I now need to use...
>
> <<pb(cat.jpg)>>
>

No, the brackets are only required for the definition. It's to allow single
line macros to be defined:

\define myMacro(something) `$something$ else`

But I'm thinking we should drop the brackets for consistency.

>
>
> Will there be any...
>
> <<pb url="cat.jpg">>
>
> or
>
> <<pb url:"cat.jpg">>
>

The latter works for macros.


> As a more generic approach...
>
> \define img(url,path)
> <img src="<<if "$path$" "$path$" "http:/default:url/">>$url$">
> \end
>
> In other words, will it be possible to define something like the above
> where the first expression checks whether the *string* being *$path$* is
> empty or not and if it isn't use it otherwise use some default url perhaps
> even defined in some global configuration, e.g. *$:/settings/**user/**
> paths.img* ...fetched via {{$:/settings/user/paths##img}} ?!?
>

My intention is to support macros written in JS for this sort of thing. I
think that introducing conditionals and so forth will make the existing
macro language overly complex.

Best wishes

Jeremy


>
> - tobias
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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 http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to