以下这个Tree是合起来的,怎么让它默认为全部展开呢?
<ul class="tree {if $blockcategories.isDhtml}dhtml{/if}">
{foreach from=$blockcategories.blockCategTree.children item=child name=blockCategTree}
{if $smarty.foreach.blockCategTree.last}
{include file=$blockcategories.branche_tpl_path node=$child last='true'}
{else}
{include file=$blockcategories.branche_tpl_path node=$child}
{/if}
{/foreach}
</ul>
<ul class="tree {if $blockcategories.isDhtml}dhtml{/if}">
{foreach from=$blockcategories.blockCategTree.children item=child name=blockCategTree}
{if $smarty.foreach.blockCategTree.last}
{include file=$blockcategories.branche_tpl_path node=$child last='true'}
{else}
{include file=$blockcategories.branche_tpl_path node=$child}
{/if}
{/foreach}
</ul>
解决方案 »
- 广州多迪网络科技有限公司有谁听过吗?
- 请教一个php eval文件加密的解密
- 请教,怎么才能找到一个公司的首席网站架构师(PHP)
- 新手提问,关于limesurvey 的邮件设定
- 安装freetype时出现问题Nothing to be done for `unix'.
- FCKEDITOR 的路径问题,望高手解答一下
- 关于php+oracle 字符显示问题
- [求助]Win7安装XKLog,发生错误,请更改文件属性为 777
- 在centos中安装php-java-bridge报错,求指点
- Wordpress主页显示问题
- 求助如何生成可以自定义名称的缩略图的方法
- file_get_contents 怎么判断是否404
<script language="javascript" for="window" event="onload">
menu(categorieslist1);
</script>function menu(oblog){
oblog.style.display='';
}
ul.tree, ul.tree ul{ list-style-type:none; display:block; }
刷新页面,全部展开,刷新完成后,又自动全部缩回去了!
模板:blockcategories.tpl,也就是css class:"tree" 和 “dhtml”在控制啊!
“dhtml”的CSS代码:div#categories_block_left ul.dhtml{ display:none; }已经被我注释掉了,
现在只有"tree"在控制啊,那我12楼那样写怎么还不行呢?
{if $blockcategories.active}
<script type="text/javascript" src="{$js_dir}tools/treeManagement.js"></script>
<!-- -->
<div id="categories_block_left" class="qblock"> <h4>{$blockcategories.catgri}</h4> <div class="block_content">
<ul class="tree {if $blockcategories.isDhtml}dhtml{/if}">
{foreach from=$blockcategories.blockCategTree.children item=child name=blockCategTree}
{if $smarty.foreach.blockCategTree.last}
{include file=$blockcategories.branche_tpl_path node=$child last='true'}
{else}
{include file=$blockcategories.branche_tpl_path node=$child}
{/if}
{/foreach}
</ul>
</div>
</div>
<!-- / -->
{/if}