Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include from absolute path and var #164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add include from absolute path and var #164

wants to merge 1 commit into from

Conversation

Vayel
Copy link

@Vayel Vayel commented Mar 12, 2014

No description provided.

@AnthonyMDev
Copy link

Where do you need to provide the variables for including from a variable with this commit?

@Vayel
Copy link
Author

Vayel commented May 8, 2014

First of all, sorry for my French English.

Line 159, we split the include's path : paths.dir.to.file becomes ['paths', 'dir', 'to', 'file']
Then, options contains the vars passed to EJS, so we check if options.paths.dir.to.file exists,
by looking for options.paths, then options.paths.dir...

So, to include a file from a var, you just need to write : include paths.foo.bar and, on the condition that you passed a var paths.foo.bar to EJS when compiling, it'll include the file having the content of paths.foo.bar as path.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants