Dede CMS Template Application php syntax method
{dede:field.test_go Php=yes}//test_go variable variable variables to be judged by itself
if (@me = = "" | | Empty (@me))//To determine whether an empty @me can be assigned to judge if it is empty to perform the next step,
@me = "None"//the @me here is equivalent to the echo in PHP for content output
{/dede:field.teest_go}//To end
Loading the content template
{Dede:field.text_go Runphp=yes}//runphp=yes means {dede:field.text_go} to run PHP program
if (@me <> ") @me =" ";//if there is something in the teext_go output this, support the HTML code, and you can use @me in your code to invoke the text _go Field
Else
@me = ""; If not, execute the following sentence
{/dede:field.audio}
Added a new function to Dede template if judging function label IIf Elserun
Add variable $str and $str _count $str is the final display $str _count is the number of loops displayed
Added the label IIF and Elserun meet IIF conditions to run normally if dissatisfied with IIF's conditions run Elserun
If the IIF condition is not met and no elserun is specified, the blank is returned
{dede:arclist orderby= "click" iif== "$str _count>1" elserun= "" $str = "temporarily no Content"}
. [field:textlink/]
{/dede:arclist}
?? Explain
Dede:arclist is a common list label for Dede
ORDER BY = "Click" Specifies how many times the almost
IIf to determine whether $str_count >1 meet the requirements are not satisfied with the output $str= "temporarily no content"
The application of dedecms PHP syntax in template