Search code examples
pythondjangocontent-management-systemfeincms

feincms applicationcontent not working with feincms_translatedpage_or_base


I have used the code from the examples in the docs, but I cannot make ApplicationContent show anything on a translated page.

The ApplicationContent is on both the base-language-page and the translated page, but it only shows up on the base-language-page.

The regions are being rendered like this:

{% feincms_translatedpage_or_base for feincms_page as feincms_transpage language=LANGUAGE_CODE %}
{% feincms_render_region feincms_transpage "main" request %}

Does anyone have any idea as to why this is?


Solution

  • Yes, merely rendering the content is not sufficient for ApplicationContent to do and/or show anything.

    The list of content blocks has to be determined earlier so that process() and finalize() can be called on all content types offering these methods (f.e. ApplicationContent.process).

    If you want to inherit content from the main translation you'd have to write your own ContentProxy subclass with a customized _inherit_from method. Please note that this method is undocumented, it probably wont go away without a very good reason though.