Hide untranslated djangocms menu items in Aldryn with hide_untranslated doesnt seem to work

141 Views Asked by At

I would like show_menu template tag to only output menu items that belong to pages that have a translation in the current language.

However I have been unable to set djangocms CMS_LANGUAGES in settings.py of my Aldryn project accordingly, using the hide_untranslated property. Aldryn seems to ignore that setting.

Also, I read from the djangocms documentation that hide_untranslated is True by default: https://github.com/divio/django-cms/blob/master/docs/reference/configuration.rst#hide_untranslated

Is it possible that Aldryn overwrites CMS_LANGUAGES? I am also asking because one can set the CMS languages in the Aldryn control panel which is possibly incompatible with settting CMS_LANGUAGES in settings.py.

1

There are 1 best solutions below

0
On

The following setting works in Aldryn to hide untranslated pages in all configured languages.

CMS_LANGUAGES['default'] = { 'fallbacks': ['en'], 'redirect_on_fallback': False, 'public': True, 'hide_untranslated': True, }