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

Allow passing a different partial to render_element #2322

Merged

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Apr 26, 2022

This is useful when rendering elements on a different page than the one
they are on, for example when rendering something like a blog overview.

What we're doing here is making all the options for render explicit.
The object key will do the magic for the partial name as a local
variable, and the locals are now more explicitly passed.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

This is useful when rendering elements on a different page than the one
they are on, for example when rendering something like a blog overview.

What we're doing here is making all the options for `render` explicit.
The `object` key will do the magic for the partial name as a local
variable, and the locals are now more explicitly passed.
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice feature, indeed

@tvdeyen tvdeyen merged commit 72f6353 into AlchemyCMS:main Apr 26, 2022
tvdeyen added a commit that referenced this pull request Apr 26, 2022
…rtial

Allow passing a different partial to `render_element`
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 this pull request may close these issues.

2 participants