PHPCMS_V9 Multi-map field content pages, home page, paging custom field calls

Source: Internet
Author: User

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

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.