Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get parent block content? #4

Closed
max107 opened this issue Dec 21, 2013 · 5 comments
Closed

How to get parent block content? #4

max107 opened this issue Dec 21, 2013 · 5 comments

Comments

@max107
Copy link

max107 commented Dec 21, 2013

How to get parent block content? like this {{ block.super }}?

p.s. - Sorry, my english so bad.

@jinnguyen
Copy link
Owner

Hi,
Thanks for your question. But can you please explain more detail about your purpose, right now Puja cannot get parent block, is it necessary ?

@max107
Copy link
Author

max107 commented Dec 23, 2013

Yes, this is really needed feature. Twig example:

base.html

{% block main %}
    world!
{% endblock %}

page.html

{% extends "base.html" %}

{% block main %}
    Hello {{ block.super }}
{% endblock %}

Result: Hello world!

Thanks for puja!

P.S. - Sorry, my english so bad

@jinnguyen
Copy link
Owner

Got it. Thanks for your respond and idea. I'll implement it and inform you asap!

@max107
Copy link
Author

max107 commented Dec 23, 2013

@jinnguyen thanks!

@jinnguyen
Copy link
Owner

hi max107,

During I implement the parent block, you can use {% include %} to include the the content into your template.

@max107 max107 closed this as completed Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants