Hi Mark,
so cool!
Thanks a lot.
Jan
Am 29.06.2016 um 05:42 schrieb 'Mark S.' via TiddlyWiki:
Not sure if this is what you mean, since you started out by describing
the situation for a template. But you can add a width parameter to the
macros:
|
\define imgposter(img wid)[img width="$wid$"[$img$]]
\define poster(wd)<$macrocall $name=imgposter img={{!!poster}}wid=$wd$/>
|
which can be invoked as
<<poster 20px>>
On Tuesday, June 28, 2016 at 6:09:16 PM UTC-7, Jan wrote:
||Hi Mark,
Thanks a lot, this was it. With your hint i made a version that
can be called by <<poster>> if tagged as a macro.
\define imgposter(img) [img[$img$]]
\define poster() <$macrocall $name=imgposter img={{!!poster}}/>
Now it would be perfect to be able to set an Imagewidth within
this shorthand like <<poster(20px)>>
My cryptic statement meant that I can't write the code into the
field (like: poster:[img[path]) into the field but just path
because it has to fit into the html videotag
Thanks and Cheers Jan
Am 28.06.2016 um 16:18 schrieb 'Mark S.' via TiddlyWiki:
I don't understand what you mean by "it has to be just the paths".
The following will show an image stored in a poster field.
|
|POSTER:<$macrocall $name=imgposter img={{!!poster}}/>|
|
Transclusion's are not real "Things", or at least that's not how
they seem to work to me. They're kind of like asking the waiter
to bring you a piece of toast, and instead he brings you a
picture of a piece of toast. So, you can't really pass the result
of transclusion, but instead you pass instructions for making the
transclusion into an entity (a macro) that can combine the
transclusion instructions with other instructions.
The two ways that I know of to accomplish this is by using a set
widget to set an environment variable, or by using the macro call
widget to set a macro variable.
Basically, whenever you find that you want to "pass" the results
of a transclusion to something else (like an image clause), you
almost always need a macro, where the results are passed as the
argument in a macro call widget, or first set as an environmental
variable using Set widget.
I may not be understanding this properly, and would be open to a
clearer explanations and/or techniques for dealing with problems
like you've outlined here.
Good luck!
- Mark
On Tuesday, June 28, 2016 at 4:03:08 AM UTC-7, Jan wrote:
Hallo!
I want to build a template in which I transclude the
imagelinks stored
in the field poster into an expression that renders the image.
It hast to be just the paths because I also have to use them
in the
videotag.
How do you do this?
[img[{{!!poster}}]] [img{!!poster}]?
Thanks and cheers
Jan
--
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] <javascript:>.
To post to this group, send email to [email protected]
<javascript:>.
Visit this group at https://groups.google.com/group/tiddlywiki
<https://groups.google.com/group/tiddlywiki>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/35578636-c5e3-48ba-b12b-bfb947c1efe3%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/35578636-c5e3-48ba-b12b-bfb947c1efe3%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
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]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[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/3e39d366-57a9-4660-a7f9-350032944c95%40googlegroups.com
<https://groups.google.com/d/msgid/tiddlywiki/3e39d366-57a9-4660-a7f9-350032944c95%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.
--
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/577394C1.7040808%40googlemail.com.
For more options, visit https://groups.google.com/d/optout.