名称: article_data 

功能: 输出文章数据

示例:

# 文章页面输出当前文章标题
{$article_data['title']}

# 读取指定文章数据,例如读取id为168的文章数据
{php}$article = EsiteApp::app()->article_data(168);{/php}


 

调用示例:

<div class="page-header">
	<h2>{$article_data['title']}</h2>
</div>
<article class="content">
	<div class="post-meta">
		<span class="post-date"><?php echo date('Y-m-d', ($article_data['edit_time']));?></span>
		<span class="post-date">阅读:<!--count_pv:A{$article_data['id']}-->次</span>
	</div>
	<div class="post-content">{$article_data['content']}</div>
	<div class="clear"></div>
</article>


数据格式打印:

Array
(
    [id] => 2
    [cat_id] => 3
    [filename] => 网站模板开发基本语法
    [defined] => 
    [title] => ECMS-API网站模板开发手册
    [keywords] => ecms模板开发手册
    [description] => ...
    [content] => ...
    [image] => 
    [edit_time] => 1543843665
    [click] => 0
    [sort] => 0
    [pv] => 1900
    [article_url] => /网站模板开发基本语法-article.html
    [category_url] => /p1-articles.html
    [category_info] => Array
        (
            [cat_id] => 3
            [category] => doc
            [parent_id] => 1
            [unique_id] => 快速上手
            [cat_name] => 快速上手
            [title] => 快速上手
            [keywords] => 
            [description] => 
            [content] => 
            [sort] => 0
            [category_url] => /快速上手/p1-articles.html
            [sonTree] => Array()
            [fatherTree] => Array
                (
                    [1] => Array
                        (
                            [cat_id] => 1
                            [category] => doc
                            [parent_id] => 0
                            [unique_id] => doc
                            [cat_name] => 开发文档
                            [title] => ECMS开发文档
                            [keywords] => ecms开发文档,ecms参考文档,ecms使用手册
                            [description] => ecms开发文档
                            [content] => 
                            [sort] => 0
                            [category_url] => /doc/p1-articles.html
                        )

                )
            [father_id] => 1
            [genTree] => Array
                (
                    [cat_id] => 1
                    [category] => doc
                    [parent_id] => 0
                    [unique_id] => doc
                    [cat_name] => 开发文档
                    [title] => ECMS开发文档
                    [keywords] => ecms开发文档,ecms参考文档,ecms使用手册
                    [description] => ecms开发文档
                    [content] => 
                    [sort] => 0
                    [category_url] => /doc/p1-articles.html
                    [children] => Array
                        (
                            [3] => Array
                                (
                                    [cat_id] => 3
                                    [category] => doc
                                    [parent_id] => 1
                                    [unique_id] => 快速上手
                                    [cat_name] => 快速上手
                                    [title] => 快速上手
                                    [keywords] => 
                                    [description] => 
                                    [content] => 
                                    [sort] => 0
                                    [category_url] => /快速上手/p1-articles.html
                                )

                        )
                )
            [relation_str] => 开发文档,快速上手
        )
    [last_article] => Array
        (
            [id] => 1
            [cat_id] => 3
            [filename] => 建站基本操作流程
            [defined] => 
            [title] => 使用ECMS建站基本操作流程
            [keywords] => ecms建站流程
            [description] => ...
            [content] => ...
            [image] => 
            [edit_time] => 1543843574
            [click] => 0
            [sort] => 0
            [pv] => 1450
            [article_url] => /建站基本操作流程-article.html
            [category_url] => /p1-articles.html
        )
    [next_article] => Array
        (
            [id] => 5
            [cat_id] => 3
            [filename] => 网站目录结构说明
            [defined] => 
            [title] => ECMS网站目录结构说明
            [keywords] => ecms目录结构说明
            [description] => ecms目录结构说明,向用户简单讲解ECMS站点各个文件/目录的基本功能。
            [content] => ...
            [image] => 
            [edit_time] => 1543844173
            [click] => 0
            [sort] => 0
            [pv] => 1730
            [article_url] => /网站目录结构说明-article.html
            [category_url] => /p1-articles.html
        )
    [content_description] => xxx
)