Blogger Information
Blog 22
fans 0
comment 0
visits 26868
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
关于volist标签嵌套if标签出现错误的解决方法
kiimi的博客
Original
706 people have browsed it

错误写法:

<div class="hflz">
    <volist name="arr1" id="vo">
        <div class="lz">
            <div class="name">{$vo.name}</div>
            <div class="cont">{$vo.cont}</div>
            <a href="javascript:void(0)" class="hf" title="{$vo.id}">回复</a>
            <a href="javascript:void(0)" class="hf1">收起回复</a>
        </div>
        <div class="hfcz">
            <volist name="arr2" id="vo1" key="num">
                <if condition="$vo.id eq $vo1.czid">
                    <div>{$vo1.cont}</div>
                </if>
            </volist>
        </div>
        <div class="re">
            <form action="" method="post">
                <textarea name="huifu"></textarea>
                <input type="hidden" value="{$vo.id}" name="lz">
                <label><a href="javascript:void(0)" class="fabiao1">发表</a></label>
            </form>
        </div>
    </volist>
</div>     <!--回复后显示回复内容的容器-->

正确写法:

<div class="hflz">
    <volist name="arr1" id="vo">
        <div class="lz">
            <div class="name">{$vo.name}</div>
            <div class="cont">{$vo.cont}</div>
            <a href="javascript:void(0)" class="hf" title="{$vo.id}">回复</a>
            <a href="javascript:void(0)" class="hf1">收起回复</a>
        </div>
        <div class="hfcz">
            <volist name="arr2" id="vo1" key="num">
                <if condition="$vo.id eq $vo1['czid']">            <!--修改此处-->
                    <div>{$vo1.cont}</div>
                </if>
            </volist>
        </div>
        <div class="re">
            <form action="" method="post">
                <textarea name="huifu"></textarea>
                <input type="hidden" value="{$vo.id}" name="lz">
                <label><a href="javascript:void(0)" class="fabiao1">发表</a></label>
            </form>
        </div>
    </volist>
</div>     <!--回复后显示回复内容的容器-->


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post