Home > CMS Tutorial > DEDECMS > body text

How to use the Mynews tag in the Dream Weaver System

王林
Release: 2019-11-07 09:30:18
Original
1972 people have browsed it

How to use the Mynews tag in the Dream Weaver System

Tag namemynews

##Function description:Site news call tag

Scope of application: global use

Basic syntax:

{dede:mynews row='' titlelen=''/}
Copy after login

Related functions:

File\include\taglib\mynews.lib.php Line 2

function lib_mynews(&$ctag,&$refObj)
Copy after login

Parameter description:

row='1' Call the number of news in the site

titlelen='24' News title length

Underlying template variable:

[field:title/]
[field:writer/]
[field:senddate function="strftime('%y-%m-%d %H:%M',@me)"/](时间)、[field:body/]
Copy after login

Usage example:

Let’s enter System background [Module]-[Site News Release], here we add 2 pieces of content according to the page requirements.

Next, we paste the following content in [Template]-[Global Mark Test] in the system background:

{dede:mynews row=2}
标题:[field:title/] 发布日期:[field:senddate function="strftime(&#39;%y-%m-%d %H:%M&#39;,@me)"/]<br/>
新闻内容:[field:body/]<br />
<hr/>
{/dede:mynews}
Copy after login

How to use the Mynews tag in the Dream Weaver System

Recommended tutorial:

dedecms Tutorial

The above is the detailed content of How to use the Mynews tag in the Dream Weaver System. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!