Others write the PHP cms is a very short statement to control how the article implemented

Source: Internet
Author: User
Others write the PHP cms is a very short statement to control how the article is implemented
I've used dedecms. The function inside him is like this. For example, I want to invoke the latest update of 10 articles in a project and I can do that.
{DEDE:IMT xx xx} and then called out. Didn't he query MySQL directly? How can I sit here and give you a clue?

------Solution--------------------
Tag name: arclist
Tags introduction: Dream common tags, also known as free list tags, where imglist, Imginfolist, Specart, Coolart, and autolist are the alias tags that are extended by the different attributes defined by the tag.
Feature Description: Get a list of specified documents
Scope of application: global use
Basic syntax:
{dede:arclist flag= ' h ' typeid= ' row= "col=" titlelen= "infolen=" "imgwidth=" "imgheight=" "listtype=" key word= ' limit= ' 0,1 '}
[field:title/]
{/dede:arclist}
typeid= ' column ID, in the list template and file template generally do not need to specify, in the homepage template allows the "," separate representation of multiple columns;

orderby= ' Sortrank ' document sorting method
§orderby= ' hot ' or orderby= ' click ' means by number of clicks
§orderby= ' Sortrank ' or orderby= ' pubdate ' sorted by publication time
§orderby= ' near '
§orderby== ' Lastpost ' by last review time
§orderby== ' scores ' ranked by score
§orderby= ' id ' sorted by article ID
§orderby= ' Rand ' randomly obtains a list of documents for the specified condition

Idlist = ' Extract specific document (document ID) call the specified ID document example idlist = ' 4,45,78,237 '
limit= ' Start ID, number of records ' (starting ID starting from 0) indicates a limited range of records (e.g. limit= ' 1 "means starting with a record with ID of 2
Keyword= ' A list of documents with the specified keywords, multiple keywords with ', ' points
orderway= ' desc ' value is DESC or ASC, specifying whether the sort is descending or a forward sort, the default is descending

Working with instances
Invoke Recommended Articles
{dede:arclist flag= "C" channelid= ' row= ' titlelen= ' ' orderby= '}
  • [Field:title/]

  • {/dede:arclist}
    Row= ' 10 ' calls 10, titlelen= ' 60 ' title length is 30 kanji flag= "C" recommended article orderby= ' default to sort by publish time
    Flag = ' C ' custom attribute value: Headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] graphics [a] bold


    Call latest articles sorted by publication time
    {dede:arclist channelid= ' row= ' titlelen= ' 60 '}
  • [Field:title/]

  • {/dede:arclist} row= ' 10 ' calls 10, titlelen= ' 60 ' title length 30 Kanji

    Sort by ID descending order, from big to small
    {dede:arclist channelid= ' row= ' titlelen= ' orderby= ' ID '}
  • [Field:title/]

  • {/dede:arclist} row= ' 10 ' calls 10, titlelen= ' 60 ' title length is 30 kanji orderby= ' ID ' by ID, descending order

    Sort order by ID, small to large
    {dede:arclist channelid= ' row= ' titlelen= ' orderby= ' id ' orderway= ' ASC '}
  • [Field:title/]

  • {/dede:arclist} row= ' 10 ' calls 10, titlelen= ' 60 ' title length is 30 kanji orderby= ' id ' by id,orderway= ' desc ' value of DESC or ASC, specifies whether sorting is descending or forward sort, Default is Descending


    Call a document containing a thumbnail
    {dede:arclist flag= "P" row= ' titlelen= ' 60 '}

  • [Field:title/]

  • {/dede:arclist} flag = ' p ' custom attribute value: Headline [h] recommended [c] picture [p] slide [f] scroll [s] jump [j] graphic [a] bold

    Various formats for dates
    [Field:pubdate function=strftime ('%d ', @me)/]
    08th [Field:pubdate function=strftime ('%d day ', @me)/]
    06-08 [Field:pubdate function=strftime ('%m-%d ', @me)/]
    June 08 [field:pubdate Function=strftime ('%m month%d ', @me)/]
    09-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
    2009-06-08 [Field:pubdate function=strftime ('%y-%m-%d ', @me)/]
    June 08, 09 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
    June 08, 2009 [field:pubdate function=strftime ('%y%m month%d day ', @me)/]
    2009-06-08 13:28 [field:pubdate function=strftime ('%y-%m-%d%h:%m ', @me)/]
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.