Visitar URL original
Documentation request · Issue #412 · feincms/feincms · GitHub
Skip to content

Documentation request #412

Description

@Eggplant77

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

Activity

  1. mjl commented on Apr 27, 2013

    @mjl
    Contributor

    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
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions