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

Expose some page fields in assigns for templates #465

Open
leandrocp opened this issue Apr 29, 2024 · 0 comments
Open

Expose some page fields in assigns for templates #465

leandrocp opened this issue Apr 29, 2024 · 0 comments
Labels
area:content Related to Content API and Content Management good first issue Good for newcomers help wanted Extra attention is needed

Comments

@leandrocp
Copy link
Contributor

leandrocp commented Apr 29, 2024

Some page fields should be exposed as assigns to be used on templates, which is useful for example to access custom extra fields. For example defining a tags page field it should be made available as @beacon.page.extra["tags"] or similar.

We can't expose all fields directly because some require post-processing like the title field which may contain Liquid expressions, so we could concentrate all exposed fields under @beacon.page.

For reference the @beacon assign is built at

beacon_assigns = BeaconAssigns.build(socket.assigns.beacon, path_info, params)

@leandrocp leandrocp added area:content Related to Content API and Content Management good first issue Good for newcomers help wanted Extra attention is needed labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:content Related to Content API and Content Management good first issue Good for newcomers help wanted Extra attention is needed
Projects
Status: No status
Development

No branches or pull requests

1 participant