Phpcms v9 Template Label Description finishing Series _php Tutorial

Source: Internet
Author: User
{Template "content", "header"} Call the root directory under the Phpcms\template\content\header file

{CHARSET} character set (GBK or Utf-8)

{if isset ($SEO [' title ']) &&!empty ($SEO [' title '])}
{$SEO [' title ']} {/if}
{$SEO [' Site_title ']}
{$SEO [' keyword ']}
{$SEO [' description ']} title and title SEO optimization

Replace the {Css_path} address with the root directory \statics\css

Replace the {Js_path} address with the root directory \statics\js

{pc:content action= "position" posid= "9" order= "id" num= "ten" cache= "3600"}pc label {pc:content parameter name = parameter value parameter name = argument value parameter name = "parameter Value" }

{Loop $data $k $v}

  • {$v [title]}

  • {/LOOP}PC Tag Value

    action= type of "position"--------------dialog box = "Content Recommendation List"
    Posid= "9"----------------------recommended bit id= "9"
    order= "id"---------------------Sort type = "id"
    Num= "----------------------number of data calls =" 10 "
    cache= "3600"-------------------cache = "3600" milliseconds

    {Get_siteid ()}
    {Img_path}
    Action= "hits" ranking, hot spots, etc.
    action= "Lists" is mainly used for lists and so on.
    Catid= "$catid" The current column ID specifies a number, that is, the specified column
    Num= "" Number of calls to the article
    order= "id DESC" in descending order by ID
    order= "id ASC" in ascending order by ID
    "Views DESC"
    Sort= ""
    "1" thumbnail image
    Return= ""
    Page= "$page" need to be paged whenever a few lines of the list appear this time

    {if $num%2==0} {/if} loop label

    {Loop $data $r} {/loop}
    {Loop $info $r} {/loop} date-------------{date (' y-m-d h:i:s ', $r [Inputtime])}
    Article link------{$r [url]}
    Article title------{$r [title]}
    Title intercept------{str_cut ($r [title],40, ' ... ')}
    Thumbnail---------loop is info using {thumb ($v [thumb],90,0)} When {thumb ($r [thumb],110,0)} loop is data)
    Paging tab------{$pages}

    Article page labels

    Title-------{$title}
    Content-------{$content}
    Date-------{$inputtime}
    SOURCE-------{$copyfrom}
    Hits------ homepage----------------{siteurl ($siteid)}
    Current position----------------{Catpos ($catid)}
    Column name----------------{$CAT [catname]}
    column Pinyin----------------{$CAT [letter]}
    Column link----------------{$CAT [url]}
    Parent column name--------------{$CATEGORYS [$CAT [Parentid]][catname]}
    Parent column Link--------------{$CATEGORYS [$CAT [Parentid]][url]}
    Upper column name--------{$CATEGORYS [$CATEGORYS [$CAT [Parentid]][parentid]][catname]}
    Upper column link--------{$CATEGORYS [$CATEGORYS [$CAT [Parentid]][parentid]][url]}

    First-level parent column list

    {pc:content action= "category" catid= "0" num= "siteid=" $siteid "order=" Listorder ASC "}
    {Loop $data $r}

  • {$r [catname]}

  • {/loop}
    {/PC} sibling column list

    {pc:content action= "category" Catid= "$parentid" num= "siteid=" $siteid "order=" Listorder ASC "}
    {Loop $data $r}

  • {$r [catname]}

  • {/loop}
    {/PC} List of photos

    {Loop $photos $r}


  • {/loop} Note: Where $photos is a custom group field, {$r [url]} is a picture address, {thumb ($r [url], 75, 45, 0)} is a picture thumbnail, {$r [Alt]} is a picture description

    http://www.bkjia.com/PHPjc/477585.html www.bkjia.com true http://www.bkjia.com/PHPjc/477585.html techarticle {Template Content,header} calls the root directory under the Phpcms\template\content\header file {CHARSET} character set (GBK or Utf-8) {if isset ($SEO [title] )!empty ($SEO [title])} {$SEO [title]}{ ...

  • Related Article

    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.