迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
联系官方销售客服
1835022288
028-61286886
关联字段如何在被关联模块里面显示
我在A模块里面关联了B模块的对象,如何在B模块里面便利所有关联的A呢?
"xgwa2": [ {module module=news FIND_xgjd=$id return=x} { "id":"{$x.id}", "title":"{$x.title}", "thumb":"{dr_thumb($x.thumb)}", "url":"{$x.url}", "keywords":"{$x.keywords}", "description":"{$x.description}", "wzlx": "{$x.wzlx}" }{$count_item == $key_item + 1? '' : ','} {/module} ],
{module module=news FIND_xgjd=$id} {/module}{$id}{$debug}
{php $sql=urlencode('SELECT * FROM dr_1_news WHERE FIND_IN_SET ('.$id.', `xgjd`) order by updatetime desc');} {sql sql='$sql'} {/sql}
因为cms字段格式创建好了就无法变更主附表类型,本插件支持将内容模块字段附表字段转移为主...
遍历到了所有的news数据,没有过滤
我在4.3.12上面使用了,但是没有效果,debug都出不了sql语句 { "xgwa": [ { "id":"29", "title":"测试资料2", "thumb":"https://hmltravel.oss-cn-shenzhen.aliyuncs.com/202008/6e296ab61e719e7.png", "url":"https://travel.hmltec.com/web/show-29.html", "keywords":"123123", "description":"是否", "wzlx": "0" }, { "id":"30", "title":"东方闪电1", "thumb":"https://hmltravel.oss-cn-shenzhen.aliyuncs.com/202008/7dc4b0f5a017f94.jpg", "url":"https://travel.hmltec.com/web/show-30.html", "keywords":"ss|sdfsdf,等等", "description":"这是描述", "wzlx": "0" }, { "id":"25", "title":"资料", "thumb":"https://hmltravel.oss-cn-shenzhen.aliyuncs.com/202008/52a12daa74cbce3.jpg", "url":"https://travel.hmltec.com/index.php?c=show&id=25", "keywords":"填下江山|我是谁", "description":"描述", "wzlx": "0" }, { "id":"34", "title":"d ", "thumb":"https://travel.hmltec.com/static/assets/images/nopic.gif", "url":"https://travel.hmltec.com/web/show-34.html", "keywords":"", "description":"d", "wzlx": "0" }, 31 ]}
除了id,我直接换成了31,其他都是你的。还是系统故障
模块字段主附表互转
因为cms字段格式创建好了就无法变更主附表类型,本插件支持将内容模块字段附表字段转移为主...