Skip to content

Instantly share code, notes, and snippets.

@navilan
Created November 23, 2010 13:50
Show Gist options
  • Select an option

  • Save navilan/711784 to your computer and use it in GitHub Desktop.

Select an option

Save navilan/711784 to your computer and use it in GitHub Desktop.
Exclude directories
{% extends "skeleton/_base.html" %}
{# Note that context variables here are meaningless since they are not evaluated in base templates #}
{# So we create the variable in the CONTEXT #}
{% block content %}
{% block content_header %}
<div id="content-header"><h1>{{ page.title }}</h1></div>
{% endblock %}
{% block content_body %}
{% endblock %}
{% for module in site.children %}
{% if module.name not in excluded_modules %}
<a href="module.url">{{module.name}}</a>
{% endif %}
{% endfor %}
{% endblock %}
# ...
CONTEXT = {
'GENERATE_CLEAN_URLS': GENERATE_CLEAN_URLS,
'excluded_modules': [
'about'
]
}
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment