-
I have configured 2 build targets with different extensions for the output.
The problem is that when I develop, I use fixtures variables as To solve it, I see only will be possible with something like
Is it possible to achieve in any other way? I tried to create a custom config as |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You could use the (currently undocumented) With that you should be able to access the currently-being-built templates' extension through:
Note that However that might get tedious to write all the time, so I'd recommend using environment configs, as you suggested with <img src="{{ page.env === 'laravel' ? 'asset(images/logo.png)' : 'images/logo.png' }}"> Nested media queries shouldn't happen unless you've got something wrong in the layout - can you show your template and the layout it extends? |
Beta Was this translation helpful? Give feedback.
You could use the (currently undocumented)
page.build.currentTemplates
object, which contains yourpage.build.templates[x]
object for every iteration, when multipletemplates
sources are used.With that you should be able to access the currently-being-built templates' extension through:
Note that
page.build.currentTemplates
is only available to you inside a template, not in a config file.However that might get tedious to write all the time, so I'd recommend using environment configs, as you suggested with
config.laravel.js
. You'd then write your HTML like this: