By default, phpcms cannot use the recommended bit to call custom fields. directly write {pc: content action = "position" posid = "30" catid = "24" order = "listorder DESC" num = "4"}: no error occurs, but data cannot be called, blank is displayed.
Call Code
01. {pc: content action = "position" posid = "30" catid = "24" order = "listorder DESC" num = "4"} 02. {loop $ data $ n $ r} 03. {$ r ["kk_date"]} 04. {/loop} 05. {/pc} Code Description
Action = "position" content recommendation bit list
Posid = "30" Call the content with a recommendation ID of 30
Catid = "24" indicates the content under the call topic ID 24.
Order = "listorder DESC ".
Num = "4" display four items
After the above Code is completed, it is still not displayed. You still need to make some settings for the fields in the phpcms background model management.
Phpcms model settings
Step 2: log on to the phpcms background.
Step 2: open content> content-related Settings> model management> Find your own model.
Step 2: Open the model, find and open "field management", and click "modify" on the fields you want to display ".
Step 2: Select "yes" on the last "to the last" call in the recommendation space tag "and click" OK "to save.
Step 2: click Modify again on the article you want to display normally, and then save the changes to take effect (if you do not change anything, modify and save the changes ).
Step 2: update the website cache to take effect.