更新时间:2024-03-21 20:13

request 地址参数

获取url地址参数 request

通过<request.参数名> 获取url地址内的参数值

例子

文章页url

http://www.ltcms.com/article/detail?moduleId=79&articleId=8

<request.moduleId>` 值为url后面参数`moduleId` 值为79    

<request.articleId>` 值为url后面参数`articleId` 值为8

html示例

<div class="left-content">
    {LTcms:artRow articleTypeId="<request.moduleId>" id="<request.articleId>" }
            <div class="content-head">
                <div class="content-title">
                    <h1>{$field['title']}</h1>
                </div>
            </div>

            <div class="article-body">
                <div class="article-intro">
                    <span class="time">{date('Y-m-d H:i:s', $field['addTime'])}</span> •
                    <span class="category"><a href="{$field['linkUrl']} ">{$field['name']}</a></span> • 发布者:
                    <span class="read">{$field['author']}</span>
                </div>
                <div class="article-content">
                    {$field['articleContentFormat']}
                </div>
            </div>
            {/LTcms:artRow}
</div>