织梦runphp=yes标签中怎么调用其他field值

 2020-01-07 09:46:27  ADMIN

织梦runphp=yes标签中怎么调用其他field值

织梦runphp=yes标签中怎么调用其他field值?

织梦runphp=yes标签中调用其他field值的方法

推荐学习:织梦cms

织梦的标签里可以通过runphp=yes的方式来执行php代码,但有些时候我们需要在一个标签的runphp=yes中调用其他的field值来作为条件,那么该如何做呢?

上网搜索了下,以下办法可以实现:

用全局变量来解决

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

在线咨询

微信客服

售后技术

QQ咨询