Can I access the filename attribute within the render function.
Blockquote jade.renderFile(filename, options)
filename - string The path to the jade file to render options
options - An options object (see above), also used as the locals object
returns string The resulting html string
For example I render a page
var jade = require('jade');
var html = jade.renderFile('path/to/file.jade', options);
can I access 'path/to/file.jade' in file.jade.
Usage is for example an include to header.jade from all my pages, in the header.jade I want to load section dependant on the filname.
i.e. faq loads different classes in the header then say index.
-if (this.filename != index.jade)
I could circumvent using another options variables but its not so nice.
--
You received this message because you are subscribed to the Google Groups "Jade" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jadejs+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.