-
Notifications
You must be signed in to change notification settings - Fork 56
Open
Description
Some of my pages have a side nav (not all, just a few). I'm using bootstrap and I was wondering how I could add proper classes when the sidenav file is present.
So when sidenav is present:
---col-3--- | ---col-9---
sideNav | page content
when not:
---col-12---
page content
My first shot was to do something in layout.jade but I cannot figure out how to check if the sideNav file is present or not in a simple way.
Here's roughly what I'd like to do in _layout.jade:
div.content-wrapper
if(current folder has a _sideNav.jade)
.sidebar-wrapper
!= partial(current.path.join('/') + '/_sideNav')
article.main-container
!= yield
else
article.main-container
!= yieldIs this doable? Or is there a better way to handle this?
Metadata
Metadata
Assignees
Labels
No labels