Skip to content

Properties from templateData and helpers are not copied to *this* #11

@edzis

Description

@edzis

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions