PHPCMS: Channel page (category.html)

Source: Internet
Author: User

1. id:{of the current column $catid}
Title style: {Title_style ($v [style])} (the right side of the title when adding or editing content

There is a selection of color blocks).
{Str_cut (Strip_tags ($v [description]), 150)} where str_tags is removing tags from html

Code, keeping only text.

2. The title should be written as such <a href= "{$v [url]}" title= "{$v [title]}"

Target= "_blank" {title_style ($v [style])}>{str_cut ($v [title],}</a>
-----------------a list of text titles--------------------------------------------
{pc:content action= "lists" catid= "$catid" order= "id DESC"

Num= "3"}
<ul class= "List" >
{Loop $data $k $v}
<li> <a href= "{$v [url]}" title= "{$v [title]}"

Target= "_blank" {title_style ($v [style])}>{str_cut ($v [title],}</a></li>
{/loop}
</ul>
{/PC}
-------------------------------------------------------------------------
---------------------------Title List---------------------------------
{pc:content action= "position" posid= "catid=" $catid "thumb=" 1 "

order= "Listorder DESC" num= "2"}
{Loop $data $v}



Target= "_blank" {title_style ($v [style])}>{$v [title]}</a>
<p>
Height= "/>{str_cut" (Strip_tags ($v [description]),}</p>
<div class= "Bk20 hr" &GT;&LT;HR/></div>
{/loop}
{/PC}
-------------------------------------------------------------------------
3. Judging
{if $n ==1}class= "on" style= "margin:0" {/if}>: If it is the first data, write

Class= "on" style= "margin:0".
4.{php $j = 1;} In the Phpcms template, you can write directly to the PHP code, which helps in some special

Development of functions.
5.
Gets the Id:get_siteid () of the current site.
6. Out of range intercept: {str_cut ($v [description],116, '. ')} (if 116 bytes are exceeded

The rest is used. instead).
7. Rank:

Number of views: {pc:content action= "hits" catid= "$catid" num= "10"

order= "views DESC" cache= "3600"}
{Loop $data $v}
<li><a href= "{$v [url]}"

Target= "_blank" {title_style ($v [style])}>{$v [title]}</a></li>
{/loop}
{/PC}

Action= "hits" order= "Views DESC": Indicates the number of hits ranked.
Cache= "3600": Cache time 3600 milliseconds.
Month Rank: {pc:content action= "hits" catid= "$catid" num= "8"

order= "Monthviews DESC" cache= "3600"}
{Loop $data $v}
<li><span>{number_format ($v

[Monthviews])} </span><a href= "{$v [url]}" {Title_style ($v [style])}

class= "title" title= "{$v [title]}" >{str_cut ($v [title],56, ' ... ')}</a></li>
{/loop}
{/PC}
{Number_format ($v [monthviews])}: Number of clicks
Number_format: formatting strings into numbers

PHPCMS: Channel page (category.html)

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.