The default is to display all ID content, how to display only one ID content separately

Source: Internet
Author: User
The default is to display all ID content, and how to display only one ID content separately
The first article of the bulletin, the default is to display all categories of articles, how to display only one of the ID categories of the article?



Store News




    {query:name=article order=id desc limit=14}
  • {echo:string::msubstr ($item [' title '],0,15)}

  • {/query}





The second is the product list, the default is to all the classification and classification of the products are displayed, how to display only one or a specified ID classification?



{list:items= $category item= $categ}

{$categ [' title ']}
{list:items= $categ [' child '] item= $child}
{$child [' title ']}
{/list}



    {set: $path _like = "Like ' $categ [path]% '";}
    {query:name=goods where= is_online eq 0 and category_id in (select ID from tiny_goods_category where path $path _like) Orde R=sort Desc LIMIT=10}



  • {$item [' name ']}

    {$currency _symbol}{$item [' Sell_price ']} {$currency _symbol}{$item [' Market_price ']}



  • {/list}



{/list}



I implore you to help the prawn, the younger brother thanked here!
------to solve the idea----------------------
For example, show All Id=1 records

Can write like this

{query:name=goods where= is_online eq 0 and category_id eq 1Order=sort Desc LIMIT=10}

You can find the classification ID in the repository, as to which category you want to check.
  • 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.