node.js - Express & Jade - max Block Nesting -
i use express 3x + jade + bootstrap +..etc
my block/extend structure looks this
.layout.jade (only head stuff)
.topnav.jade (only top nav)
.sidenav.jade (sidenav , control center interface)
.slideprem.jade (the actual content)
now try res render slideprem
-> renders sidenav, topnav, layout (so "extends" statement read out of slideprem)
but wont show content of slideprem
so after many many hours of recoding, searching, reintending, etc
. rewrote structure slideprem -> sidenav -> layout
-> renders slideprem, sidenav, layout
->>> there limit of nested blocks?
-> editable?
-> or cld u imagine error somewhere else?
regards pika
edit:
//slideprem.jade// extends ../sidenav block wall #bla (or alert or sth) //sidenav.jade// extends topnav block content #subheader #subheadnav #content //doesnt conflict "block content" div.container div.row div.span9 block wall div.span3 // further code //topnav.jade// extends layout block navigation div.topnav..... div... ... block content #modal //layout.jade// doctype 5 html head title= title <meta name="viewport" content="width=device-width, initial-scale=1.0"> link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=titillium+web&subset=latin,latin-ext', type='text/css') link(rel='stylesheet', href='/bootstrap/css/bootstrap.min.css') link(rel='stylesheet', href='/bootstrap/css/bootstrap-responsive.min.css', media="screen") link(rel='stylesheet', href='/stylesheets/style.css') link(rel='stylesheet', href='/stylesheets/ccenter.css') script(src='/javascripts/jq.js') script(src='/bootstrap/js/bootstrap.min.js') script(src='/javascripts/core.js') script(src='/javascripts/ajax.js') body block navigation
you should try work includes instead of extends.
so can try layout.jade :
html head (...) body block navigation
and in navigation.jade block
extends layout block navigation .topnav (div aren't required in jade) (...) include content
your content.jade needs
#subheader #subheadnav #content //doesnt conflict "block content" div.container div.row div.span9 include wall div.span3
if that's not clear enough, can find include documentation on github page of project.
i hope it'll help.
Comments
Post a Comment