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

Pass allowed page types into page chooser #277

Merged
merged 1 commit into from Dec 4, 2020
Merged

Pass allowed page types into page chooser #277

merged 1 commit into from Dec 4, 2020

Conversation

kaedroho
Copy link
Contributor

@kaedroho kaedroho commented Dec 1, 2020

Fixes #267

Some page choosers have limited page types which could be defined either by the foreign key being set to a specific page type or a list of allowed page types on the PageChooserPanel/Block.

This adds support for finding this information from the panel/block and passing it into the widget on the frontend.

While implementing this, I discovered an inconsistency with the way we're extracting related page segments from streamfield. On the model, these are extracted as overridable segments, but in streamfield they were being extracted as a translatable related object segment. This PR fixes that as well.

Fixes #267

Some page choosers have limited page types which could be defined either
by the foreign key being set to a specific page type or a list of
allowed page types on the PageChooserPanel/Block.

This adds support for finding this information from the panel/block and
passing it into the widget on the frontend.

While implementing this, I discovered an inconsistency with the way
we're extracting related page segments from streamfield. On the model,
these are extracted as overridable segments, but in streamfield they were
being extracted as a translatable related object segments. This PR fixes
that as well.
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.

[bug report + feature request] PageChooserPanel
2 participants