On Jun 2, 9:36 am, Jeff <
jeff-googlegroups-pub...@gordon-net.com>
wrote:
> I'm using a macro named mgtdList that's normally invoked similarly to this:
> <<mgtdList
...
> tags:'(^-Next-Action || Next || Active || ^-Active) && !Done && Starred &&
> !"@Discussion.weekly"'
...
> However, I'd like to have an Alias or Transclusion like this:
> IncludeNextActions: (!Done && (^-Next-Action || Next || Active || ^-Active))
> or
> alias IncludeNextActions "(!Done && (^-Next-Action || Next || Active ||
> ^-Active))"
> So that I can invoke mgtdList like:
> <<mgtdList
...
> tags:'IncludeNextActions && Starred && !"@Discussion.weekly"'
...
> The purpose is that I'm trying to make some options available to mGSD so
> that people can configure more of it through options or at least have one
> more level of abstraction away from the code.
The TWCore doesn't have a special syntax that allows you to use
aliases or transclusion to assemble the parameters within a macro.
However, it does support "evaluated parameters", which allows you to
invoke a snippet of javascript code and use the result as a macro
parameter value, and it does have a function for retrieving the stored
contents of a tiddler. You can use these to achieve your desired
goal:
Start by creating a tiddler named [[IncludeNextActions]], containing
your configurable tag expression:
(!Done && (^-Next-Action || Next || Active || ^-Active))
Then, in your macro usage, you can write:
<<mgtdList
...
tags:{{store.getTiddlerText('IncludeNextActions')+' && Starred
&& !"@Discussion.weekly"'}}
...
The content in between the {{...}} is javascript code that first
retrieves the text stored in [[IncludeNextActions]] and then appends
the rest of the tag expression to it. The resulting combined text is
then used as the value of the tags:... macro parameter.
QED.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
WAS THIS ANSWER HELPFUL? IF SO, PLEASE MAKE A DONATION
http://www.TiddlyTools.com/#Donations
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact