if then else for different designs in makro

54 views
Skip to first unread message

Gerald Weis

unread,
May 10, 2018, 5:30:04 AM5/10/18
to TiddlyWiki
Hi friends,

im searchin fo a solution for this problem

<<solution headlinename

if headlinename = attention then
  design of headline = design1
    headline = "Attention"
   design of leftside =left1
   picture=attention.png
   design oft rightside =right1
  text
endif
if headlinename = Info then
  design of headline = design2
    headline = "Info"
   design of leftside =left2
   picture=attention.png
   design oft rightside =right2
  text
endif
f headlinename = Tip then
  design of headline = design3
    headline = "Tip"
   design of leftside =left2
   picture=attention.png
   design oft rightside =right2
  text
endif

Jed Carty

unread,
May 10, 2018, 5:45:40 AM5/10/18
to TiddlyWiki
This is one structure that would work:


\define solution(headlinename)
<$list filter='[[$headlinename$]prefix[attention]]'>
<!-- Whatever you want if the input is 'attention'-->
Your headline is <<currentTiddler>>
</$list>
<$list filter='[[$headlinename$]prefix[info]]'>
<!-- Whatever you want if the input is 'info' -->
Your headline is <<currentTiddler>>
</$list>
<!-- Add more list widgets for your other options -->
\end

<<solution attention>>
Reply all
Reply to author
Forward
0 new messages