PHPcms v9 Template Field Calling Quick Reference

<<>>
For content pages, use {$xyz} directly.
For list pages, query the model’s table. For example, if it’s a news model, query the phpcms_c_news table, then use {$r[xyz]}.

Article Thumbnail:

”{$r[title]}”

Article Title:
{str_cut($r[title], $titlelen)}

Article Description:
{str_cut($r[description],800)}

Article Excerpt:
{str_cut(strip_tags($r[content]),340)}

Your Current Location
Home > News > {$CATEGORY[$catid][catname]}

{$title} –Article Title
{$url} —-Article URL
{$CATEGORY[$catid][catname]}—Category Name of the Article
{$CATEGORY[$catid][url]} —-Category URL of the Article
Call the Parent Category ID of the Article’s Category
{$CATEGORY[$flmid][catname]} —Parent Category Name of the Article’s Category
{$CATEGORY[$flmid][url]} —-Parent Category URL of the Article’s Category

Article Pagination:
{if $pages}

{$pages}

{/if}

 

Article Date:
{if $showdate}{date(‘Y-m-d’,$r[updatetime])}{/if}

Common Variable: $cid

Site URL: {$PHPCMS[siteurl]}{SKIN_PATH}

Template Path: {SKIN_PATH}

Custom Field Call: {$r[***]} *** is your custom field

({date(‘Y-m-d h:i:s’,$r[updatetime])}) PHPCMS Time Code

{str_cut($r[title], $titlelen,”)}PHPCMS Title Code

{str_cut($r[description], $introlen)} PHPCMS Description Code

”{$r[title]}”PHPCMS Image Code

{loop $data $n $r}Content{/loop}PHPCMS Loop Code

You Might Also Be Interested In
PHPCMS v9’s Upgrade Model Is Too Outdated
Source: Xiake Webmaster Station (www.xkzzz.com)
Full Article Reference: http://www.xkzzz.com/zz/ym

Leave a Comment

Your email address will not be published.