PHPCMS_V9 Multi-map field content pages, home page, paging custom field calls
Description: Custom multi-image field name Shigongtu
1 content Page Invocation
{Loop$shigongtu$r}
$r[url]} "title=" Test "/>
{/loop}
2 first page, paging call
The first recommended bit calls the custom field
After you add a custom field to the model, you must click Yes in the recommended bit label
And then use the same method to adjust the data is OK, remember, if you add the article, you must go to update the article will be displayed, the custom segment in the recommended only show you choose, the selection before adding the article does not display, update the article shows
Example:
{pc:content action= "position" posid= "recommended bit ID" num= "thumb=" 1 "moreinfo=" 1 "order=" Listorder DESC "}
{Loop$data$key$val}<li>
<a href= "{$val[' URL ']} " target= "_blank" >$val[' Custom segment ']} ' alt= "{$val[' title ']} " height=36 width=98/></a>
<a href= "{$val[' URL ']} " target= "_blank" >{str_cut ($val[' title '],20)}</a></li>
{/loop}
{/PC}
Normal list or column call custom field
After {pc:content action= "lists", add the Sub-table moreinfo=1 (equals 1 o'clock display, 0 o'clock does not display)
Example:
{pc:content action= "lists" moreinfo= "1" catid= "Wuyi" order= "id" num= "5" cache= "3600"}
{Loop$data$r}
<a href= "{$r[url]} " target= "_blank" > {$r[Title]} </a>
{PHPEval("\ $arr =".)$r[Shigongtu]. ";");}
{Loop$arr$val}
{$val[url]} |
{/loop}
{/loop}
{/PC}
Note:
It is necessary to do a PHP variable assignment in the template. The array of variables found in the loop tag cannot be used to directly reuse loops.
{pc:get sql= "select * from V9_house_data where id=2" num= "1" cache= "3600"return= "Data"}
{Loop$data$r}
{PHPEval("\ $arr =".)$r[HxT]. ";");}//This assignment must be increased to two loops of the array of variables
{Loop$arr$rs}
{$rs[' FileURL ']}
{/loop}
{/loop}
{/PC}
PHPCMS_V9 Multi-map field content pages, home page, paging custom field calls