Monday, February 25, 2019

Re: Tag block and endblock

If you have multiple pages in a website , say , home page , about page and contact page  , now all common content that is not changing from page to like navbar , header and footer you place them in a template page  you can call it layout.html , and in this template page layout .html you define a reserved space for the content that will be changed from page to page using an empty block tag ...

Now for example lets create home page , first you extend the layout.html , then you put inside the block tag the data specific for home page only ..

You see , the purpose of this system is not to repeat the static content in navbar , header and footer in each page 

On Tue, 26 Feb 2019, 00:20 Nexx, <anatolecadet@gmail.com> wrote:
Wht is the purpose of the tag
{% block myBlock %}
I red the document but i don't underatand.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7c8648e8-bf1a-4803-99f8-92c3a9064ae9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHV4E-dODwSM8CacgpdHnGLewfm1CG4rA2ysn01tTk%3DMcpX7_Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment