Volt Compile

Is it possible to use volt to compile without <?php ?> tags ?

I'm using postcss-plugins and it transforms my classNames > .myclass{...} is now ._v1{...}

Now I need to replace my volt html classNames;

<div class="myclass"></div> needs to be <div class="_V1"></div

I know that I can create a function for that but I think it's better to cache already the className not a function

Hi @costampombo1997 compile without php tags? how do you handle conditionals, includes, etc ?

edited 8d ago

>Hi @costampombo1997 compile without php tags? how do you handle conditionals, includes, etc ?

i don't need conditionals. "without php tags" is just for classNames.

<div class="{{assets.getClassName('myclass') }}">

to

<div class="_V1">

instead of

<div class="<?= $this->assets->getClassName('myclass');?>">

Volt cache caches OUTPUT. So there will be no difference, you can still make it as class name. Output will be cached, no functions or anything will be fired.