TanzCMS开源CMS系统

URL链接

TanzCMS 官方文档示例,展示模板标签、开放 API、内容管理和部署说明。

更新:2026-05-30 20:08:03 浏览:3

URL 与链接标签

通用 url

{url to=home}
{url to=category catid=5}
{url to=article id=$t.id}
{url to=member path=profile}
{url href=/search keyword=$keyword}
参数 说明
to=home 首页 /
to=category / to=cat / to=list 栏目链接。
to=page 单页栏目链接。
to=article / to=content / to=show 内容详情链接。
to=member 会员中心链接。
to=module 模块前台链接。
to=plugin 插件前台链接。
to=search 搜索链接。
href=/path 直接地址,可附加其他查询参数。

专用 URL 标签

标签 说明
{category_url catid=5} 栏目链接。
{category_url item=$nav} 使用栏目数组生成链接。
{page_url slug=about} 单页栏目链接。
{article_url id=$t.id} 内容详情链接。
{content_url item=$t} 内容详情链接,等价文章 URL。
{search_url keyword=$keyword} 搜索链接。
{member_url path=profile} 会员中心链接。
{module_url code=docs path=tanzcms} 模块链接。
{plugin_url code=flash_sale path=} 插件链接。

会员 URL 示例

{member_url path=login}
{member_url path=register}
{member_url path=profile}
{member_url path=orders}
{member_url path=notifications}

模块/插件 URL 示例

{module_url code=docs path=tanzcms}
{module_url code=docs path=tanzcms/list-page.html}
{plugin_url code=flash_sale path=}
{plugin_url code=flash_sale path=record id=10}