Mark,

Thanks for the Suggestion

I am still getting hard to resolve problems

\define mymenubutton(color,icon,caption)
<$button class="dropbtn" style="@@background-color:$color$">@@background-
color:$color$;$icon$ {{$caption$}}@@</$button>
\end
\define showmenu(menuname)
<$set name="currentMenu" value="[[$menuname$]]">
<$set name=menufilter tiddler="$menuname$" field="menu-filter" emptyValue={{
$:/PSaT/MyMenus/menufilterdefault}}>
<div class="dropdown">
  <$macrocall $name=mymenubutton color="{{$menuname$!!color}}" icon=
"{{$menuname$!!icon}}" caption="$menuname$!!menu-caption"/>
....

In the above case I have the Caption working but not the icon and color
The Icon returnes the correct name of the icon not the icon
And if I remove the {{ }}  from the macro call they do not work as the 
caption does

I suppose the key difference is the tiddler name is in fact provided as 
$menuname$

Thanks,

I will investigate with a fresh mind tomorrow.

Tony


On Thursday, January 18, 2018 at 3:18:49 PM UTC+11, Mark S. wrote:
>
>
> Maybe like this:
>
> \define custombutton(color,icon,caption)
> <$button style="background-color:$color$">@@background-color:$color$;
> {{$icon$}} $caption$@@</$button>
> \end
>
> <$macrocall $name=custombutton color={{ButtonInfo!!color}} 
> icon={{ButtonInfo!!icon}} caption={{ButtonInfo!!caption}} />
>
> Using a tiddler ButtonInfo which has fields color=lightblue, 
> icon=$:/core/images/chevron-down, and caption="A little blue"
>
> -- Mark
>
>
>
> On Wednesday, January 17, 2018 at 5:25:08 PM UTC-8, TonyM wrote:
>>
>> Hi Folks,
>>
>> A Question I have not being able to answer
>>
>> I have tiddlera calling a macro
>>
>> <<macroname tiddlerb>>
>>
>>
>> The Macro is global ie tagged  with $:/tags/Macro
>>
>> In the tiddlercmacro tiddler I have
>>
>> \define macroname(tiddlername)
>> <div class="dropdown" >
>>  <button class="dropbtn">
>>    <$transclude tiddler="$tiddlername$" field=caption mode=inline/>
>>  </button> 
>>  <div class="dropdown-content">....
>>
>> The Above is displaying the content of the caption field as the button 
>> name - as wanted.
>>
>> However I have tried a number of things and can not seem to also do the 
>> following.
>>
>> Display the icon from  tiddler="$tiddlername$" field=icon
>> Colour the icon and caption from tiddler="$tiddlername$" field=color
>>
>> 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/0533eea9-4b50-4d92-b66d-046aeced436a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to