Skip to content
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

Extend EntityPlusController and restore/rewrite template_preprocess_paragraphs_item #113

Closed
argiepiano opened this issue Dec 7, 2021 · 1 comment · Fixed by #114
Closed

Comments

@argiepiano
Copy link
Contributor

In recent a issue (#110) and a recent merged PR (#111) we fixed a rendering problem (#91) by eliminating a faulty #theme_wrappers in paragraphs.field_formatter.inc and by using paragraphs_preprocess_entity_plus instead of template_preprocess_paragraphs_item to preprocess variables for the template paragraphs_item.tpl.php.

However, after further discussion with @laryn we decided to, instead, create a new entity controller for Paragraphs to override buildContent in order to override the default theme for Entity Plus entities (entity_plus) and instead use the theme paragraphs_item. This will allow us to go back to use template_preprocess_paragraphs_item to preprocess variables, which makes more sense for other developers who want to extend this preprocessing with their own hook implementations in the future.

In addition to creating a new entity controller for Paragraphs, we need to rewrite template_preprocess_paragraphs_item to do all the necessary preprocessing that used to be done by template_preprocess_entity_plus.

PR coming

@argiepiano argiepiano changed the title Extend EntityPlusController and restore/rewrite template_paragraphs_item_preprocess Extend EntityPlusController and restore/rewrite template_preprocess_paragraphs_item Dec 7, 2021
argiepiano added a commit to argiepiano/paragraphs that referenced this issue Dec 7, 2021
@argiepiano
Copy link
Contributor Author

PR: #114

@argiepiano argiepiano added the has pr Has a PR or branch for testing. label Dec 7, 2021
@laryn laryn closed this as completed in #114 Dec 7, 2021
laryn pushed a commit that referenced this issue Dec 7, 2021
@laryn laryn removed the has pr Has a PR or branch for testing. label Dec 7, 2021
laryn added a commit that referenced this issue Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants