gulp-file-include icon indicating copy to clipboard operation
gulp-file-include copied to clipboard

condition(if) on loop show error not defined

Open therajuahammad opened this issue 6 years ago • 3 comments

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.

therajuahammad avatar Jul 25 '19 06:07 therajuahammad

Did you put blog variable into context data?

Gaslan avatar Aug 15 '19 09:08 Gaslan

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

therajuahammad avatar Aug 15 '19 11:08 therajuahammad

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',

lmitton avatar Aug 12 '20 15:08 lmitton