PageAdmin网站内容管理系统(CMS)交流论坛

注册

 

QQ登录

只需一步,快速开始

发新话题 回复该主题

急急急如何调用整站的最新文章! [复制链接]

1#

表单模型管理,自定义表单、模型。 然后去数据库,把自定义调用的表修改为:information 。在自定义模型-模块模型 数据列表区调用代码。 例如:只显示文章标题38个字符和日期代码:
<UL class=template_list_title_box title=" <%#DataBinder.Eval(Container.DataItem,"title")%> ">
  <LI class=template_list_title_left><A class=template_list_title   href="/index.aspx?menuid=<%#DataBinder.Eval(Container.DataItem,"lanmu1id")%>&amp;type=articleinfo&amp;lanmuid=<%#DataBinder.Eval(Container.DataItem,"lanmu3id")%>&amp;infoid=<%#DataBinder.Eval(Container.DataItem,"id")%>&amp;language=cn"
  target=_self><%#Get_title_num(DataBinder.Eval(Container.DataItem,"title").ToString(),38,true)%> </A> </LI>
  <LI class=template_list_title_right><SPAN><%#DataBinder.Eval(Container.DataItem,"thedate","{0:yyyy-MM-dd}")%></SPAN> </LI></UL>


然后栏目管理设为自定义模型,选择 你开始建立的模型,进去设置sql条件语句。一切处理完 就可以了!~

听起来比较复杂,简单的来说,就是利用自定义模型,建立模型,然后,去数据库修改成原来的文章数据库表,而不用系统新建的表,最后根据你想要过滤的内容,写入需要执行的sql语句。
分享 转发
TOP
发新话题 回复该主题