Php joomla 2.5“如何获取”;模块类后缀";
我正在尝试获取菜单模块的模块类后缀。这就是我试图实现的方法:echo$module->$params->get('class_sfx');但是没有结果。。有人知道怎么做吗? 当我 打印($module->params); 结果是Php joomla 2.5“如何获取”;模块类后缀";,php,joomla,joomla2.5,Php,Joomla,Joomla2.5,我正在尝试获取菜单模块的模块类后缀。这就是我试图实现的方法:echo$module->$params->get('class_sfx');但是没有结果。。有人知道怎么做吗? 当我 打印($module->params); 结果是 {"menutype":"test","startLevel":"1","endLevel":"0","showAllChildren":"0","tag_id":"","class_sfx":"cc_page_main_body_bottom_menu_item_pa
{"menutype":"test","startLevel":"1","endLevel":"0","showAllChildren":"0","tag_id":"","class_sfx":"cc_page_main_body_bottom_menu_item_panel_menu_container_first","window_open":"","layout":"_:center-top","moduleclass_sfx":"cc_page_main_body_bottom_menu_item_panel_website","cache":"1","cache_time":"900","cachemode":"itemid"}
我想你的回音里有太多美元了。它应该是$module->params->get('class_sfx');观看params的$in
在模块本身中,您通常可以使用$params->get('class_sfx')获取该模块的参数,而不使用$module块。您是对的,只是$params->get('class_sfx')起作用,我刚刚实现了$params->get('moduleclass_sfx'),thanxIs在joomla?@user3408380中是否可以使用外部php代码更改模块块的后缀?我建议您在joomla.stackexchange.com上问这个问题,因为您需要添加更多上下文。总是改变它,还是只是在某种情况下?你为什么要在外部代码中更改它?我们有一个代码可以生成用户的警告。无警告为模块的绿色背景色,警告应为模块的红色背景色。我们认为使用后缀…@user3408380可能是最好的方法。但这与这个问题无关,所以请问你自己的问题。