织梦runphp=yes标签中怎么调用其他field值?
织梦runphp=yes标签中调用其他field值的方法
推荐学习:织梦cms
织梦的标签里可以通过runphp=yes的方式来执行php代码,但有些时候我们需要在一个标签的runphp=yes中调用其他的field值来作为条件,那么该如何做呢?
上网搜索了下,以下办法可以实现:
立即学习“PHP免费学习笔记(深入)”;
用全局变量来解决
{dede:php}$GLOBALS['xxoo']=$refObj->Fields['fieldname']{/dede:php}{dede:field.xxxxrunphp="yes"}@me="test".@me."-test".$GLOBALS['xxoo'];{/dede:field.xxxx}