Z-blogPHP website articles have multiple tags, only displaying the first three

The following code can be used in a column list or article detail page.

{foreach array_slice($article.Tags,0,3) as $tag}<a href="{$tag.Url}" title="{$tag.Name}">{$tag.Name}</a>{/foreach}

另外你也可以加上{if $article.Tags}判断是否有标签,没有标签则不显示!如下图所示:

image.png

t like3

Link to this article:https://en.finchui.com/zblog-course/18.html

netizens commented

guess you like

hot commodity
popular articles
hot Tags
related tags
FinchUI Store Edition Hong Kong Special Area

share

copy Link

Xinglan Studioadd friends

Working hours: 9:00-22:00
Saturday and Sunday: 14:00-22:00
wechat
Scan the code to add customer service WeChat