Runphp = yes label call method in dedecms

Source: Internet
Author: User

Runphp = 'yes' in the loop.

 

The code is as follows: Copy code
{Dede: arclist row = 14 titlelen = 32 noflag = 'h '}
<Li> <a href = "[field: arcurl/]"> [field: title/] </a>
[Field: id runphp = 'yes']
If (@ me = 5 ){
@ Me = 'select ';
} Else {
@ Me = 'deselected ';
 }
[/Field: id]

Then let's call other field values in the more advanced runphp = yes tag.

Example

The code is as follows: Copy code

{Dede: php} $ GLOBALS ['xxoo '] = $ refObj-> Fields ['fieldname'] {/dede: php}
{Dede: field. xxxx runphp = "yes"} @ me = "test ". @ me. "-test ". $ GLOBALS ['xxoo ']; {/dede: field. xxxx}

That is, first open a PHP label and replace the value to be assigned with the global variable. Then assign the field value to him in another operation.


Use the following code for the content page:

The code is as follows: Copy code

{Dede: field. id runphp = 'yes '}
Global $ cmd_cmspath;
$ Tags = GetTags (@ me );
$ Revalue = '';
$ Tags = explode (',', $ tags );
Foreach ($ tags as $ key => $ value ){
If ($ value ){
$ Revalue. = '<a href = "'. $ export _cmspath. '/tags. php? /'. $ Value.'/"> '. $ value.' </a> ,';
   }
  }
@ Me = $ revalue;
{/Dede: field. id}

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.