What's the best practice for including block titles? For example, I
have a product template that I'm using to create product pages. On
this template, I have a block called "use cases" that has a
placeholder block for Django CMS inside it. How do I set a default
title for a block? And then can I override it if I want to? Without
the ability to do that, you have to add the code in each page that
uses the block (<h2 class="block-title">use cases</h2>).
In Drupal, you can set a default title for each block, and also
override the default title if you want to, but I can't see how to do
that with Django templates. One way might be to create a special block
for the title of each block, but then you'd end up having twice as
many blocks on the page, and it would make the page awfully fussy,
esp. if you added a placeholder block (for Django CMS) in each block
to let users edit. That would look something like this, right?
<h2 class="block-title">{% block use_cases_title %}use cases{%
placeholder use_cases_title %}{% endblock use_cases_title %}</h2>
{% block use_cases %}
{% placeholder use_cases %}
{% endblock use_cases %}
Thanks for any help.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.