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

condition(if) on loop show error not defined #172

Open
therajuahammad opened this issue Jul 25, 2019 · 3 comments
Open

condition(if) on loop show error not defined #172

therajuahammad opened this issue Jul 25, 2019 · 3 comments

Comments

@therajuahammad
Copy link

Hello,
I use condition if on loop file. then i call this on index file . but show error condition variable isn't defined.

Please See screenshots for details:
http://prntscr.com/ojqkxt
http://prntscr.com/ojqkxt
http://prntscr.com/ojqkxt

Thanks.

@Gaslan
Copy link

Gaslan commented Aug 15, 2019

Did you put blog variable into context data?

@therajuahammad
Copy link
Author

yes i want call blog variable when call loop file on index.html or others file

@lmitton
Copy link

lmitton commented Aug 12, 2020

Passed the name variable with the @@include('includes/navbar.html', {"name" : "Test"})
Within navbar.html it replaces the @@name value and I get Test, however when I try an if statement
@@if (name === "Test"){<li>Hello</li>}
I get the following error.
message: 'name is not defined: (name === "Test")',
plugin: 'gulp-file-include',

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

No branches or pull requests

3 participants