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 default_page_types to allow respecting that in folder_contents #208

Merged
merged 1 commit into from
Jul 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/147.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Pass default_page_types to allow respecting default_pages_types.
[pbauer]
5 changes: 5 additions & 0 deletions plone/app/content/browser/contents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ def get_thumb_scale(self):
thumb_scale_table = settings.thumb_scale_table
return thumb_scale_table

def default_page_types(self):
registry = getUtility(IRegistry)
return registry.get('plone.default_page_types', [])

@property
def ignored_indexes(self):
ignored = [
Expand Down Expand Up @@ -291,6 +295,7 @@ def get_options(self):
'indexOptionsUrl': '%s/@@qsOptions' % base_url,
'contextInfoUrl': '%s{path}/@@fc-contextInfo' % base_url,
'setDefaultPageUrl': '%s{path}/@@fc-setDefaultPage' % base_url,
'defaultPageTypes': self.default_page_types(),
'searchParam': 'Title',
'availableColumns': columns,
'attributes': ['Title', 'path', 'getURL', 'getIcon', 'getMimeIcon', 'portal_type'] + list(columns.keys()), # noqa
Expand Down