{// 引用头部文件,通常把通用的html代码块放到一个文件里面,使用include标签引用。} {include file="common/head"}
{include file="common/menu"}
{// 调用站点模块,图集类型的内容,name是标识,站点模块支持图集、视频、内容数据、文字链接、html代码。} {hkcms:adv name="home_banner"}

{$item.title}

{$item.notes}

{if $i==3} {// 调用站点模块视频演示,itemid表示获取排序第一的视频,如果你只是一个视频可以不写} {hkcms:adv name="video" id="video" itemid="1"}

{:__('Video play')}

{/hkcms:adv} {else /} {// 语言包:{:__('通常这里写英文,如果没有找到,则显示Know Us,有找到Know Us则中文对照就显示中文')}

{:__('Know Us')}

{/if}
{/hkcms:adv}
{// 获取演示数据里关于我们,catid=3表示栏目ID,还可以传入英文目录字段,或变量} {hkcms:content catid="3"}
{// 使用content标签可以获取该内容的栏目信息,$item.category.title表示栏目标题,后面的default表示为空的时候默认显示什么}

{$item.category.title|default=''}

{// 获取公司简介的封面图,若想生成缩略图使用hkcms:thumb标签 } {$item.title}

{$item.title}

{// 获取公司简介的内容,后面加default可以避免字段不存在的错误,default="abc"表示字段不存在或为空时显示abc}
{$item.content|default=""}
{// 语言包:默认模板语言包在static\module\index\default\lang\zh-cn.json。 } {:__('Read More')}
{/hkcms:content}
{hkcms:channel name="21"}

{$item.title}

{/hkcms:channel}
{hkcms:content catid="21" num="6" order="weigh desc,views desc"}
{$item.category.title}
{$item.views} {// if语句的使用,下面是判断价格大于0就显示价格,反之显示咨询 } {if !empty($item.price) && $item.price>0}
¥ {$item.price|default=""}
{else /}
{:__('Consult')}
{/if} {// $item.fullurl是包含域名的url地址 }
{$item.title}
{$item.description}
{/hkcms:content}
{hkcms:channel name="21"} {:__('Read More')} {/hkcms:channel}
{hkcms:channel name="21" type="son" id="channel" key="ii"} {// 默认循环变量$i,上面key改成了使用$ii 从1开始。每次循环加1}
{hkcms:content catid="$channel.id" num="6" order="weigh desc,publish_time desc"}
{$item.category.title}
{$item.views} {// if语句的使用,下面是判断价格大于0就显示价格,反之显示咨询 } {if !empty($item.price) && $item.price>0}
¥ {$item.price|default=""}
{else /}
{:__('Consult')}
{/if} {// $item.fullurl是包含域名的url地址 }
{$item.title}
{$item.description}
{/hkcms:content}
{/hkcms:channel}
{hkcms:channel name="19"}

{$item.title}

{/hkcms:channel}
{hkcms:content catid="19" num="6" order="weigh desc,views desc" key="k"}
{$item.title}

{$item.title}

{$item.category.title}

{/hkcms:content}
{hkcms:channel name="19"} {:__('Read More')} {/hkcms:channel}
{hkcms:channel name="19" type="son" id="cate" key="k"}
{// 使用php标签写原生:作用是为空的时候显示暂无数据。把这个值给到content里面的empty,如果没有html标签则就直接empty="暂无数据"即可} {php}$empty = '

- '.__('No content available').'-

';{/php} {hkcms:content catid="$cate.id" num="6" order="weigh desc,views desc" empty="$empty"} {/hkcms:content}
{/hkcms:channel}
{hkcms:channel name="9"}

{$item.title}

{/hkcms:channel}
{// 获取新闻中心内的栏目 id为9,结合content标签输出内容,如果要获取副表内容more="1"即可} {hkcms:channel name="9" type="son" id="cate" num="2" key="ii"}

{$cate.title} {:__('More')}

    {hkcms:content catid="$cate.id" num="6" order="weigh desc,publish_time desc" key="k"} {// $k从1开始,第一个文章显示图文} {if $k==1}
  • {$item.title}

    {$item.title}

    {$item.title}

  • {else /}
  • {// 使用if语句,给前三行加上底色,$k是从1开始的} {if $k<=3} {$k} {$item.title} {else /} {$k} {$item.title} {/if} {//api="human" 将采用日期语义化显示,另外还支持限制范围比如说:lt="2592000" 表示超过6个月的时间按format里面的格式输出} {hkcms:date name="$item.publish_time" format="Y-m-d" api="human"}
  • {/if} {/hkcms:content}
{/hkcms:channel}
{hkcms:channel name="9"} {:__('Read More')} {/hkcms:channel}

合作伙伴

{hkcms:adv name="partner"} {/hkcms:adv}
{include file="common/footer"}