Closed sandrodz closed 5 years ago
Hi,
Problem is caused by
+ "/images/"
part.
I don't think so. According to the message, the local assets_url
has not been provided. You should pass it to locals array (render parameter) or as a shared variable.
$pug = new Pug(...);
$pug->displayFile('template.pug', [
'assets_url' => '/directory',
]);
Thanks,
Well. I'm pretty sure I'm passing assets_url
, because removing + "/images/"
it works.
assets_url
will just return an empty string if not set with default settings. I can't reproduce this. Please provide a minimum chunk of code (including templates, the PHP code and locals values to be rendered) to copy-paste and reproduce your bug.
Ideally, if you can reproduce it on https://pug-demo.herokuapp.com/ you can just provide the template, settings and locals used.
Problem is caused by
+ "/images/"
part.