macro includeblock vs. import
- balicekt
- Člen | 52
Zdravim mam problem s import.
pokud pouziji {includeblock ‚../Include/error.latte‘} vse funguje OK a
vykresli se.
pokud pouziji {import ‚../Include/error.latte‘} {include myerror} dostanu
chubu: Undefined variable: form
soubor s error.latte vypada takto:
<?php
{block myerror}
<div id="div4" class="errormes" n:if="$form->hasErrors()" n:foreach="$form->errors as $error">
<div class="message-box-wrap">
<span class="close-but" id="colosebut4">close</span>
<i class="fa fa-exclamation-circle fa-lg"></i> {$error|noescape}
</div>
</div>
{/block}
?>
nejake napady uz me nenapada co s tim. Diky moc!