We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Problem with multiple inheritance in volt

Hi I have problem with multiple inheritance in volt. The parent block seems to be escaped and output a raw php tag like this example.

{# base.volt #}
{% block bodyhead %}
<div class="header">                    
    <div id="divcity" >Pilih Area Anda &nbsp;
        {{ select('visitor_area', area, 'using': ['id', 'name'], 
        'useEmpty': true, 'emptyText': 'Area...', 'emptyValue': '0') }}
    </div>
</div>
{% endblock %}

{# index.volt #}
{% extends "layouts/base.volt" %}
{% block bodyhead %}
    <p>This is index</p>
    {{ super() }}
{% endblock %}

My expected Output is like this:

<p>This is index</p>
<div class="header">                    
    <div id="divcity" >Pilih Area Anda &nbsp;
        <select name="visitor_area" id="visitor_area">
            <option value="0">Area...</option>
            <option value="1">Bali</option>
        </select>       
    </div>
</div>

But the real Output from phalcon is like this.

<p>This is index</p>    
<div class=\"header\">                  
    <div id=\"divcity\" >Pilih Area Anda &nbsp;
        <?php echo Phalcon\Tag::select(array('visitor_area', $area, 'using' => array('id', 'name'), 'useEmpty' => true, 'emptyText' => 'Area...', 'emptyValue' => '0')); ?>
    </div>
</div>

What is wrong?



98.9k

Hi, are you using windows?

Yes, I am using windows: Phalcon 0.9.0 - Windows x86 for PHP 5.4.0 (VC9)

@jeffreycahyono I just recompiled the 0.9.1 DLLs which I believe fix this issue.

They should be available in the download area in an hour tops.

Yeah, thanks a lot. It's been fixed and worked as expected in windows using the latest 0.9.1 But in the github still 0.9.0, and the problem still exist in Linux using 0.9.0

Try compiling from the 0.9.1 branch