Skip to content

[IDEA] Add macro operator #8732

Open
Open
@Leilei332

Description

@Leilei332

The current implementation of using macros in filters isn't good enough:

<$list filter="[<mymacro param:'value'>]">
...
</$list>

It isn't able to use variables or textreference as a parameter of the macro. I think we had better introduce a macro operator so that variables and textreference can be used as parameter (like the function operator). For example

<$list filter="[macro[mymacro],[value]]">
...
</$list>

<$let template="DDth MMM YYYY">
<!-- variables and textreference are allowed -->
{{{ [macro[now],<template>] }}}
{{{ [macro[now],{$:/config/NewJournal/Title}] }}}
</$let>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions