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} |