Phpcms enterprise site knowledge and phpcms enterprise site knowledge

Source: Internet
Author: User

Phpcms enterprise site knowledge and phpcms enterprise site knowledge

Header.html

Footer.html

Use index.html for the main page

Use list.html for the webpage

Page.html for a single webpage

Show.html for internal content

 

{Template "content", "header"} introduces the header
{Template "content", "footer"} introduced at the end

{IMG_PATH} path of the image to be imported (no /)
{JS_PATH} js introduces the JS path (no /)
{CSS_PATH} css introduced path (no /)

{Pc: content action = "category" catid = "0" num = "25" siteid = "$ siteid" order = "listorder ASC "}
{Loop $ data $ r}

{/Loop}
{/Pc}

<-- PC tag -->
Pc: content indicates that the content module is called.

Action = "category" category (column) calls the category column

Action = "lisis" lisis (content data list) call list

Catid = "0": the parent column of all level-1 columns in the parent column is 0.

Num = "25"

Siteid = "$ siteid" only one site id is siteid = "$ siteid"

Order = "listorder ASC" sort by sort ASC in ascending order


<-- LOOP tag -->
The outer PC is like writing an SQL statement, and then traversing it with LOOP

$ Data is equivalent to a two-dimensional array.

$ R $ each item retrieved by data is handed over to $ r

{Siteurl ($ siteid)} retrieves the site path id address


Navigation bar practices:
Home page:
{If $ top_parentid = 0 & $ catid = ""}
<Div class = "nei select"> <a href = "{siteurl ($ siteid)}"> homepage </a> </div>
{Else}
<Div class = "nei"> <a href = "{siteurl ($ siteid)}"> homepage </a> </div>
{/If}

Use if to determine the upper-level code of $ top_parentid, click to select the color, do not select the color
Navigation except the Home Page:
{Pc: content action = "category" catid = "0" num = "7" siteid = "$ siteid" order = "listorder ASC "}
{Loop $ data $ r}

{If $ catid = $ r [catid] | $ top_parentid = $ r [catid]}
<Div class = "gang"> </div>
<Div class = "wai">
<Div class = "nei select"> <a href = "{$ r [url]}" >{$ r [catname]} </a> </div>
</Div>
{Else}
<Div class = "gang"> </div>
<Div class = "wai">
<Div class = "nei"> <a href = "{$ r [url]}" >{$ r [catname]} </a> </div>
</Div>
{/If}

{/Loop}
{/Pc}

Content:

{Pc: content action = "lists" catid = "21" order = "id DESC" num = "3" moreinfo = "1 "}
<Ul>
{Loop $ data $ val}
<Li> </li>
{/Loop}
</Ul>
{/Pc}

 

{If isset ($ SEO ['title']) &! Empty ($ SEO ['title'])} {$ SEO ['title']}
{/If} {$ SEO ['site _ title']}
Replace the webpage title

<Meta name = "keywords" content = "{$ SEO ['keyword']}"> website keywords
<Meta name = "description" content = "{$ SEO ['description']}"> website description


Extract the first number of characters of a certain item, and use... to replace it.
{Str_cut ($ val [title], 48 ,"... ")}


Cancel "| 0" behind the source"
{Php list ($ copyfrom) = explode ('|', $ val [copyfrom])}
{$ Copyfrom}


Pagination page = "$ page"
{Date ('Y-m-d H: I: s', $ val [inputtime])}
Output: {$ pages}

 

Http://v9.help.phpcms.cn/CMSV9 help center/

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.