您现在的位置是:首页 > 网站建设网站建设

ecshop 专题页面如何调用文章列表?

江湖快报网2023-03-07 04:46:31【网站建设】人已围观

简介这个很容易啊。
你先获取要获取的文章分类下的文章.调用该函数get_cat_articles()

然后在模板中,直接 foreach显示出来就可以。
求助怎么调用一级栏目名和链接 帝国cms
1、

这个很容易啊。
你先获取要获取的文章分类下的文章.调用该函数get_cat_articles()

然后在模板中,直接 foreach显示出来就可以。

求助怎么调用一级栏目名和链接 帝国cms

1、调用栏目名称: <?=$class_r[栏目ID]['classname']?>
示例:<?=$class_r[1]['classname']?> ,在这种情况下,就可以正常显示栏目id为1的栏目名称。
2、
调用栏目链接: <?=$class_r[栏目ID]['classpath']?>
特别说明:因为调用的时候,后台会没有“/”,你可以这样写:<?=$class_r[1]['classpath']?>/
,如此一来,后台就能正常显示一个斜杠了。
3、调用指定id的栏目别名: <?=$class_r[栏目ID]['bname']?>

ecshop 我想给导航栏每个栏目加一个id,id的值是cat_id的值要怎么弄

导航栏只能是后台自定义导航栏调用的,如果要设置 id没有意义,因为id是分类才有,如果导航变成分类的话,直接把分类的代码复制过去就行了

ecshop 模板里头的怎么在page_header.lbi 页面顶部 模板里给导航调用左侧分类的ID

<!--{foreach from=get_categories_tree() item=cat name=cat0}--> <!--一级分类-->
<!--{if $smarty.foreach.cat0.iteration <=13 }-->
<div class=pop-subcategory id=cNav{$smarty.foreach.cat0.iteration}>
<div class=class-subcategory>
<!--{foreach from=$cat.cat_id item=child name=name}--> <!--二级分类--> <dl>
<dt><a target=_blank href={$child.url} class=track>{$child.name|escape:html}</a></dt>
<dd>
<!--{foreach from=$child.cat_id item=childer}--><!--三级分类-->
<a target=_blank href={$childer.url} class=track>{$childer.name|escape:html}</a>
<!--{/foreach}-->
</dd>
</dl>
<!--{/foreach}-->
</div>
<div class=pop-channel>
<div class=channel-icon>
<a class=track href={$cat.url} target=_blank><img src=../images/cty_left_img/cty_topimg{$smarty.foreach.cat0.iteration}.jpg></a> </div>
<div class=channel-brand>
<dl>
<dt><a class=track href=brand.php target=_blank>推荐品牌</a></dt>
<dd>
<!--{foreach from=get_brands1($GLOBALS['smarty']->_var['cat']['id']) item=bchilder name=name1}-->
<a class=track href={$bchilder.url} target=_blank>{$bchilder.brand_name}</a>
<!--{/foreach}-->
</dd>
</dl>
</div>

<div class=channel-brand>
<dl>
<dt><a class=track target=_blank href=activity.php>促销活动</a></dt>
<dd>
<!-- {foreach from=$promotion_info1 item=item1 key=key name=name2} -->
<!-- {if $item1.type eq snatch} -->
<a href=snatch.php title={$lang.$item1.type} target=_blank>{$lang.snatch_promotion}</a>
<!-- {elseif $item1.type eq group_buy} -->
<a href=group_buy.php title={$lang.$item1.type} target=_blank>{$lang.group_promotion}</a>
<!-- {elseif $item1.type eq auction} -->
<a href=auction.php title={$lang.$item1.type} target=_blank>{$lang.auction_promotion}</a>
<!-- {elseif $item1.type eq favourable} -->
<a href=activity.php title={$lang.$item1.type} target=_blank>{$lang.favourable_promotion}</a>
<!-- {elseif $item1.type eq package} -->
<a href=package.php title={$lang.$item1.type} target=_blank>{$lang.package_promotion}</a>
<!-- {/if} -->
<a href={$item1.url} title={$lang.$item1.type} {$item1.act_name}{$item1.time} target=_blank>{$item1.act_name}</a></br>
<!--{/foreach}-->
</dd>
</dl>
</div>
</div>
</div>
<!--{/if}-->
<!--{/foreach}-->

仅供参考,样式自已设定哦

Tags:

很赞哦! ()

文章评论

    共有条评论来说两句吧...

    用户名:

    验证码:

本站推荐