Django-CMS: How to access extended fields of the Title model

148 Views Asked by At

I need to extend the Title model as I want to provide a teaser to every page of a multi lingual project. I was able to create the desired extended fields and a cms-toolbar item to assign values to the extended fields.

How can I access extended fields of the Title model in django-cms-3.0.12 as they are not available via {% page_attribute 'extended_field' %} in the template. The django-cms documentation does not seem to provide an answer to my question, nor am I able to find an easy solution in the cms code base as well.

Best Regards.

1

There are 1 best solutions below

2
On

You would access the data via the request current_page object found in the template context... For example:

{{ request.current_page.iconextension.field }}  

Doc ref