Phpcms makes common labels for simple enterprise sites, and phpcms enterprise site labels

Source: Internet
Author: User
Tags add time

Phpcms makes common labels for simple enterprise sites, and phpcms enterprise site labels

Title Keyword keywords description

Source copyfrom allows access to allow_visitor = 1 thumb thumbnail

 


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

 

 

{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

Select selected color in class

 


<-- If tag -->
If judgment

Example:
{If $ top_parentid = 0}
<A href = "{siteurl ($ siteid)}">
<Div class = "h-item select"> homepage </div>
</A>
{Else}
<A href = "{siteurl ($ siteid)}">
<Div class = "h-item"> homepage </div>
</A>
{/If}
Use if to determine the upper-level code of $ top_parentid, click to select the color, do not select the color

$ Catid = $ r [catid] determine whether the current address bar id is equal to the id to be selected

$ Top_parentid = $ r [catid] is used for level 2 and level 3 columns.

{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

 


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

 

Add pagination page = "$ page" num to set the number of lines output on a page

Add time {date ('Y-m-d H: I: s', $ val [inputtime])}

Output: {$ pages}

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.