Skip to content

parseSnippets filter does not render component markup override #5

@jeremymouton

Description

@jeremymouton

The parseSnippets filter does not render component markup override, but only the default markup.

I have a plugin with a component which is also registered as a snippet using the registerPageSnippets() function. This component has default markup, but I override the component's markup in the partials directory of my theme.

When editing a page, adding the component's snippet to the default "Content" field (output using {% page %}) renders correctly using the component's markup override in the partials directory – but when I add it to a custom richeditor field using the parseSnippets filter (like {{ my_custom_field | parseSnippets }}), it renders the component's default markup.

Removing the unique aliasing from the registerComponentSnippet() function (https://github.com/inetis-ch/oc-richeditorsnippets-plugin/blob/dev/classes/SnippetLoader.php#L26-L27) fixes this issue – but I don't know what might break in the process of removing this line. Do you know what the unique alias is meant to do?

Metadata

Metadata

Assignees

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