Hi, i have a question, i see that when use volt template, a new file was created with php extension, example:
volt file: ( login.volt)
<script type="text/javascript">
var s_user_required ="{{ _('Usuario requerido') }}";
var s_pass_required = "{{ _('Password requerido') }}";
</script>
<div class="container">
<div class="card card-container">
<form id="form_login" class="form-signin">
<h2 class="form-signin-heading">{{ _('Inicio de sesion') }}</h2>
<input type="text" id="user_name" name="user_name" class="form-control" placeholder="{{ _('Ingrese su Usuario') }}" required autofocus>
<input type="password" id="user_password" name="user_password" class="form-control" placeholder="{{ _('Ingrese su password') }}" required>
<div id="user_remember" class="checkbox">
<label>
<input type="checkbox" name="user_rememberme" value="1">{{ _('Recordarme') }}
</label>
</div>
<button id="btn_process_login" class="btn btn-lg btn-primary btn-block btn-signin" type="submit">{{ _('Iniciar Sesion') }}</button>
</form>
<a href="#" class="forgot-password">
{{ _('Olvidaste tu password?') }}
</a>
<div id="message_login"></div>
</div>
</div>
and the new php extension volt file : ( login.volt.php)
<script type="text/javascript">
var s_user_required ="<?php echo gettext('Usuario requerido'); ?>";
var s_pass_required = "<?php echo gettext('Password requerido'); ?>";
</script>
<div class="container">
<div class="card card-container">
<form id="form_login" class="form-signin">
<h2 class="form-signin-heading"><?php echo gettext('Inicio de sesion'); ?></h2>
<input type="text" id="user_name" name="user_name" class="form-control" placeholder="<?php echo gettext('Ingrese su Usuario'); ?>" required autofocus>
<input type="password" id="user_password" name="user_password" class="form-control" placeholder="<?php echo gettext('Ingrese su password'); ?>" required>
<div id="user_remember" class="checkbox">
<label>
<input type="checkbox" name="user_rememberme" value="1"><?php echo gettext('Recordarme'); ?>
</label>
</div>
<button id="btn_process_login" class="btn btn-lg btn-primary btn-block btn-signin" type="submit"><?php echo gettext('Iniciar Sesion'); ?></button>
</form>
<a href="#" class="forgot-password">
<?php echo gettext('Olvidaste tu password?'); ?>
</a>
<div id="message_login"></div>
</div>
</div>
So, my question is......why use volt code? and no php code on volt file?.....
i can use php code on volt file? (login.volt), the performance is affected at some point?? or not?