Dream Dedecms List Page The method of calling all top-level column articles

Source: Internet
Author: User

These days with weaving dream site, found a lot of problems.

When we use the article in the article also and the article List page to invoke the label Dede:arclist does not restrict the column ID
Will only invoke the current column of the article, if it is to call the whole station of the article found using typeid= ' 1,2,3,4,5,6,7,8,9,10 ' so call out all IDs,
When the column ID a lot of words will have some trouble!
So how can you directly call the dream of the whole station of the CMS post label it?

Method One:


{dede:arclist row= ' number ' typeid= ' all ' orderby= ' pubdate '}
[field:title/] {/dede:arclist}

This place is used for Typeid=all

Another method is the following:

{dede:arclist row= ' number ' typeid= ' top ' orderby= ' pubdate '}
[field:title/] {/dede:arclist}

This is typeid=top.
We can find the top tag directly in the tag source file.
This can see that top is a more formal label, such as the site after the revision of the upgrade is still available.

Calling top-level column name methods on list pages and content pages

{Dede:field.typeid runphp= ' yes ' function= ' Gettopid (@me)}
$dsql = new Dedesql (false);
$a = "Select TypeName from Cn_arctype where id= @me";
$arcRow = $dsql->getone ($a);
@me = $arcRow [TypeName]; {/dede:field.typeid}

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.