Applying Parameters in Macros...

51 views
Skip to first unread message

Jan

unread,
Mar 28, 2017, 8:32:25 AM3/28/17
to TiddlyWiki
Hej!
I do not understand how to use parameters in macros correctly...

I would like to set the $(clipname)$ of the video in the second macro,
somehow I do not manage to get it in there correctly.
The rest is already working fine in a macro where the cliplink is set by
a field llike the other elements of the cliplink.
I would like to call it <<videofile "my video.mp4">>


\define videofile(clipname)
<$list filter="[all[current]!is[system]]">
<$vars seminar={{!!seminar}} thema={{!!thema}} videosource={{folderpath}}>
<video controls id="fullstart" width=600px poster={{!!poster}}>
<source src=<<cliplink>>>
</video></$vars>
</$list>
<$list filter="[all[current]is[system]]"><div class="videoslide">
<$tiddler tiddler={{$:/HistoryList!!current-tiddler}}>
<$vars seminar={{!!seminar}} thema={{!!thema}} videosource={{folderpath}}>
<video controls id="fullstart" width=600px z-index=40 poster={{!!poster}}>
<source src=<<cliplink>>>
</video></$vars>
</$tiddler></div>
</$list>
\end

\define cliplink()
$(videosource)$$(seminar)$/$(thema)$/V/$(clipname)$
\end

Thanks for help


Jed Carty

unread,
Mar 28, 2017, 9:46:05 AM3/28/17
to TiddlyWiki
Change the line:

<$vars seminar={{!!seminar}} thema={{!!thema}} videosource={{folderpath}}> 

to

<$vars seminar={{!!seminar}} thema={{!!thema}} videosource={{folderpath}} clipname="""$clipname$"""> 

and it should work.

Jan

unread,
Mar 28, 2017, 12:47:58 PM3/28/17
to tiddl...@googlegroups.com
Thank Jed,
works perfect, you saved my day.

Greetings 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 tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@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/99f0a2f2-45d8-4f55-8834-4341da0915ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages