Skip to content

Pass variables to includes? #30

@mhulse

Description

@mhulse

There have been times where I'd like to tell an include something based on parent template … Maybe there's a better way that I'm not aware of, but it would be nice to have the ability to pass variables to the preprocessed include files.

For a Grunt example, grunt-include-replace:

@@include('/path/to/include/message.html', {"name": "Joe Bloggs"})

Would it makes sense for Preprocess to allow for variables, defined at the template level (i.e., at the time of the include call) to be passed to the included files?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions