0

I have the following block of HTML code:

<header>
    <div>....</div>
</header>

On one page only, I need to have:

<header class="something">
    <div>....</div>
</header>

Is there a simple way of doing this rather than doing too many overrides?

1
  • you mean to say remove redundancy ? Commented Nov 21, 2013 at 18:14

1 Answer 1

1

For example like this:

<header class="{% if a_flag %}something{% else %}somethingelse{% endif %}">
    <div>....</div>
</header>

where a_flag is a variable in the current context.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.