-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
Move blocks from layout from base_layout #1593
Conversation
9184894
to
7164687
Compare
7164687
to
d122d61
Compare
Could you please rebase your PR and fix merge conflicts? |
it's the example how the user should extend the layout.html.twigfile: templates/bundles/SonataPageBundle/layout.html.twig {% extends '@SonataPage/base_layout.html.twig' %}
{% block sonata_page_stylesheets %}
<link rel="stylesheet" href="your.css" media="all">
{% endblock %}
{% block sonata_page_body %}
<header>
{{ block('sonata_page_container_header') }}
</header>
<section>
{{ block('sonata_page_container_breadcrumb') }}
</section>
{% block sonata_page_container_content_top %}
{% if page is defined %}
<section>
{{ parent() }}
</section>
{% endif %}
{% endblock %}
<section>
{{ block('sonata_page_container_content') }}
</section>
{% block sonata_page_container_content_bottom %}
{% if page is defined %}
<section>
{{ parent() }}
</section>
{% endif %}
{% endblock %}
<footer>
{{ block('sonata_page_container_content_footer') }}
</footer>
{% endblock %} |
Hey @jordisala1991 what do you think we move the blocks created into the this way I can reuse the code when I'm overriding the |
IMO we should split PRs. If you are removing deprecated blocks, thats one PR. If you are adding new blocks, thats another PR. To me the only one needed to release is to remove deprecated blocks, but if you want to add more blocks I won't block that PR. (but please, we do separate to see what is new and what is removed better). |
Could you please rebase your PR and fix merge conflicts? |
Ok, I'll let this PR for this new blocks and after that I rebase with 4.x. |
This PR is blocked by #1594 |
well, and about this iPR make sense we overwrite the layout to work like this? or should we use sonata functions directly into the extended template (in the user side) |
The main motivation for this PR is the user avoid to implement things like this
|
Is this PR a bugfix for 4.x (for a thing that was working on 3.x?), or does this PR breaks BC in a way that it can't be done in a minor? If any of those 2 question the answer is "Yes", and the PR is simple enough, let's do it, otherwise let's wait after 4.0 |
I'll reopen this PR when I back to work on this ;) |
Subject
I am targeting this branch, because {reason}.
Closes #{put_issue_number_here}.
Changelog
To do