Ticket #1663 (new enhancement)

Opened 13 years ago

Only show documents in the current language in content portlet.

Reported by: joseluis.rosa@… Owned by: jmorliaguet
Priority: P2 Milestone: CPS 3.5.7
Component: CPSPortlets Version: 3.4.0
Severity: normal Keywords: content portlet language
Cc:

Description

The content portlet shows documents of all languages, we propose to:

1.- Add a new boolean widget (and field) with id 'language_filtered' in the Content Portlet to "only show documents in the current language".

2.- Modify the script widget_portlet_content.pt to give getContentItems the parameter 'language_filtered'.

3.- In the script getContentItems.py, add the lines

if kw.get('language_filtered', False):
   query['Language']= context.translation_service.getSelectedLanguage()

before the statement:

brains = context.portal_catalog(**query)

Thank you very much.

Note: See TracTickets for help on using tickets.