}
@register.inclusion_tag('includes/metaNav.html', takes_context=True)
-def metanav(context, active=None):
+def metanav(context):
try:
request_path = context['request'].path
except KeyError:
var newTitle = html?html.match(/<title>(.*?)<\/title>/):'';
if(newTitle){document.title = newTitle[1].trim().decodeHTML();}
- /*
- Quite UGLY but needed for styling the whole body with ID
- Feel free to correct and find a better way
- According to this link the probles is that $(html).filter('body').Attr('id') will not work!
- http://www.devnetwork.net/viewtopic.php?f=13&t=117065
- */
- if(sectionName = $(html).find('[data-section]').attr('data-section')){
- $('body').attr('id',sectionName);
- }else{
- var bodyID = html.match(/<body id="(.*?)">/);
- if(bodyID){$('body').attr('id',bodyID[1].trim());}
- }
$.scrollTo('#Changing',1000,{offset:-$('#metaNav').height()+2});
init();
{% block extrascripts %}{% endblock %}
</head>
-<body {% block bodyattr %}id="{{sectionName}}" class="section-{{sectionName}}"{% endblock %}>
+<body {% block bodyattr %}{% endblock %}>
<div id="All">
- {% block meta %}<div id="metaNav">{% metanav active=sectionName %}</div>{% endblock %}
+ {% block meta %}<div id="metaNav">{% metanav %}</div>{% endblock %}
<div id="Commons" class="cf" >
<div class="wrapper sided" >
<div id="backgroundBox" class="cf">
</div>
</div>
</div>
- <div id="Changing" class="cf" data-section="{{ sectionName }}">
+ <div id="Changing" class="cf">
{% block toptitle %}{% endblock %}
<div id="Nav" class="cf" >
{% block nav %}{% endblock %}