docpad-plugin-jade
                                
                                
                                
                                    docpad-plugin-jade copied to clipboard
                            
                            
                            
                        Properties from templateData and helpers are not copied to *this*
I am defining some data in docpad config
templateData:
    site:
        navigation: [
            { href:'/#', label:'home' }
            { href:'/#what-we-do', label:'what we do' }
            { href:'/#clients', label:'clients' }
            { href:'/#blog', label:'blog' }
            { href:'/#contact', label:'contact' }
        ]
site is available in the scope of a page and template, but it is not a member of this.
This raises problems when i am using partials plugin and passing the scope to it !=partial("sections/header.html.jade", this)
At that moment the following evaluations result in false
hasOwnProperty('site')
hasOwnProperty('getFilesAtPath')
This is different to how it behaves on the default parser for .eco files. Where they evaluate to true and the same config variables are also accessed inside the partial.
I'm plain not able to access any property in templateData from within the document - everything is undefined.
Try out to use a jade mixin instead of the partial plugin, jade has this feature built-in