feincms / feincms

A Django-based CMS with a focus on extensibility and concise code
http://www.feincms.org/
BSD 3-Clause "New" or "Revised" License
942 stars 230 forks source link

Documentation request #412

Open Eggplant77 opened 11 years ago

Eggplant77 commented 11 years ago

Integrating 3rd party apps is a bit unclear about template inheritance imo.. I want my application detail/list views to override the base.html title block, but the content template lacks an extends rule (else it will just embed the entire page within the region?), I figured out one way but it seems hackish...

class MyDetailView(DetailView):
    def get_context_data(self, **kwargs):
        context = super(MyDetailView, self).get_context_data(**kwargs)
        page = Page.objects.for_request(self.request)
        setattr(page, 'title', self.object.title)
        context['feincms_page'] = page
        return context

Please advise or update the documentation, thanks

mjl commented 11 years ago

You are right, this part is woefully underdocumented.

In the meantime, check out this thread here, that is exactly what you are looking for: https://groups.google.com/d/msg/django-feincms/YQtTpJj0xVU/q4qyxrrcgZwJ

Cheers,

mjl