Skip to content

Instantly share code, notes, and snippets.

View sunxhy's full-sized avatar

Persephone Martinez sunxhy

View GitHub Profile
@sunxhy
sunxhy / xyhcms.html
Created April 21, 2020 03:29
[xyhcms笔记]记录使用技巧 #xyhcms
栏目高亮
<if condition="$catlist['id'] eq $cid"> class="current"</if>
if标签嵌套不能超过三层;
超过了把if替换成notempy
<notempy></notempy>
列表页显示顶级栏目名称
{$cid} 当前栏目id
<yang:type typeid='$cid' level='top'>
@sunxhy
sunxhy / navlist.html
Last active April 21, 2020 05:06
[xyhcms导航高亮]头部导航 #xyhcms #高亮
<li <if condition="($cid eq 0) and ($cate['id'] eq 0) and ($cate['pid'] eq 0)">class="navces"</if>> <a href="<yang:siteurl />">首页</a></li>
<yang:navlist typeid='0'>
<li <if condition="($navlist['id'] eq $cid) OR ($cate['pid'] eq $navlist['id']) OR ($cate['id'] eq $navlist['id'])">class="navces"</if>> <a href="{$navlist.url}">{$navlist.name}</a>
<notempty name="navlist['child']">
<dl>
<volist name="navlist['child']" id="vo">
<dd><a href="{$vo|get_url}">{$vo.name}</a></dd>
</volist>
</dl>
</notempty>