-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with including part query in macro #423
Comments
To make sure that macros are available in the queries 2 things need to be satisfied:
So to use macros in part config you need to register your macros first and then use richTextQuery:
|
@pmi I did this, but i thought it was a hacky way of doing it. |
@poi33 Those are not hacks, those are foundations of javascript 😆 The change showed missing because of lacking mappings import in _component.ts file that I fixed today, so that should not be an issue any more ! |
Nice, I'll check if it works today 🎉 |
I have a TextArea in a part configuration.
This textArea can have macroes inside it.
Lets say the field is
text
Then the query for the part needs to include:
Now this will be too much to handle manually. Especially since the system can have any macro number of
TextArea
s or macroes.Luckely the
src\_enonicAdapter\guillotine\getMetaData.ts
includes a function for getting them:RichTextQuery
.Now the does not work to include it a part query? It looks like the ComponentRegistry (defined in _mapping) is not include the macroes at the same stage?
So the
RichTextQuery
cant be used inside querys that get registered to the ComponentRegistry?I would assume the ComponentRegistry was available when the macroes are defined higher up then the parts, but they don't seem to be registred at all?
The text was updated successfully, but these errors were encountered: