.
3ss.cn

DEDE在runphp=yes的标签中怎么样调用其他field值

DEDE在runphp=yes的标签中怎么调用其他field值?

DEDE织梦CMS模板在runphp=yes的标签中调用其他field值的方法

dedecms在runphp=yes的标签中调用其他field值 dedecms有强大的TAG自定义功能,但如果你是在runphp=yes的情况下,你无法使用[field]等标签

因为它不解析了(都当成PHP代码了,怎么可能解析呢?)

怎么办?

查了一下google,没有发现解决方法。所以我想了很久想出一个临时性的解决方法,即用全局变量来解决这个问题。。

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

即,先开一个PHP的标签,把想赋的值替换给global变量。然后在另外的运行中将field值赋值给他。

赞(0)
未经允许不得转载:互联学术 » DEDE在runphp=yes的标签中怎么样调用其他field值

评论 抢沙发