Folks,
Perhaps a wizz can help me?
I am trying to Use a variable to name a field, from which to get its value.
In this example I set the variable menu-context and call the macro
I want it to return the value in the field
{{Testmenu-filtercode!!menu-filter-viewheader}} if it exists *NOT WORKING*
Other wise the value in {{Testmenu-filtercode!!menu-filter}} if it exists
WORKING
Otherwise the value in {{$:/PSaT/MyMenus/menufilterdefault}} if it exists
WORKING
The key issues seems to be my syntax for the set widget
value={{$menuname$!!menu-filter-<menu-context>}}
Can anyone please assist?
I have the below code in a test tiddler Testmenu-filtercode
\define mymenufilter(menuname)
Context:<<menu-context>><br>
<$set name=menufilter value={{$menuname$!!menu-filter-<menu-context>}}
emptyValue={{$menuname$!!menu-filter}}>
menu-filter1 = <<menufilter>>,
<$set name=menufilter value={{$menuname$!!menu-filter}} emptyValue=
"{{$:/PSaT/MyMenus/menufilterdefault}}">
menu-filter2 = <<menufilter>>
</$set>
</$set>
\end
<$set name=menu-context value=viewheader>
Menu-context = <<menu-context>><br>
<<mymenufilter "Testmenu-filtercode">>
</$set>
...
Thanks in advance
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/6b7006fb-8158-4949-85bd-3df3ab3e063f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.