NoahWeb
在线搜索
NoahWeb.net | 开发者交流中心 | 支持 | 文档 | 反馈缺陷 

newsedit动作代码

显示所有新闻列表以执行新闻管理动作。

该动作所需要的模组:checkuserpurview,autopage

该动作所需的字符资源: page_list,list_allnews

<!-- 新闻管理 -->

<Action name="manager.newsedit" NextAction="">

<!-- 调用checkuserpurview模组-->

<ModuleLink Id="checkuserpurview" />

<!-- 调用autopage模组-->

<ModuleLink Id="autopage" />

<Out Area="main">

<!-- 调用数据库查询集news_S_count,该查询机返回news表中纪录的总行数-->

<SQLLINK Id="news_S_count" />

<!-- 设置变量 -->

<SetVar Name="_root.itemperpage" Value="18" />

<!-- 设置变量 -->

<SetVar Name="_root.totalcount" Value="[_SQL._this.news_S_count.0.count]" />

<!-- 设置变量 -->

<SetVar Name="_this.maxpage" Value="[_root.totalcount]/[_root.itemperpage]" />

<!-- 设置变量 -->

<SetVar Name="_this.pointaction" Value="'newsedit_input'" />

<!-- 显示字符资源list_allnews -->

<Echo ContentLinkId="list_allnews" />

<!-- 条件判断语句-->

<If EX="[_root.maxpage]&gt;1">

<!-- 显示字符资源page_list -->

<Echo ContentLinkId="page_list" />

</If>

</Out>

</Action>

 


查看NoahWeb在线手册

Copyright © 2001-2004 The NoahWeb Corporation
All rights reserved.