Brother Lian phpcms basic Video tutorial resource sharing

Source: Internet
Author: User
In our daily work development process, for many small partners for the enterprise station is an essential step, so today to introduce the "Brother Lian Phpcms basic Video Tutorial" for everyone to explain how phpcms is used, how to use PHPCMS to make Enterprise website, and some template use, Two-time development tips!

Course Play Address: http://www.php.cn/course/377.html

The teacher's lecture style:

Teachers teach in a clear, well-organized, layered analysis, interlocking, rigorous argumentation, structural rigorous, with the logical power of thinking to attract students ' attention, with reason to control the course of classroom teaching. Teaching skills, full of wit, all kinds of teaching methods, skills, at ease, just right, and without the slightest trace of the carving.

The more difficult in this video should be: Custom PHPCMS module Detailed operation:

The code is as follows:

{Loop $shigongtu $r}{/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:

The code is as follows:

{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" ></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:

The code is as follows:

{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>{php eval ("\ $arr =". $r [Zuzwn]. ";");} {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.

The code is as follows:

{pc:get sql= "select * from V9_house_data where id=2" num= "1" cache= "3600" return= "Data"} {Loop $data $r} {php eval ("\ $arr =". $r [HxT]. ";");} This assignment must be increased to two times the loop variable array {loop $arr $rs} {$rs [' FileURL ']}{/loop}{/loop}{/pc}
Related Article

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.