简体   繁体   English

joomla 2.5如何获取“模块类后缀”

[英]joomla 2.5 how fetch “Module Class Suffix”

I am trying to fetch the Module Class Suffix of my menu module. 我正在尝试获取菜单模块的模块类后缀。 This is how i am trying to achieve this: echo $module->$params->get('class_sfx'); 这就是我试图达到的目的:echo $ module-> $ params-> get('class_sfx'); But no results.. anyone know how to do this? 但是没有结果..有人知道该怎么做吗? Also when I 当我

print_r($module->params); print_r($ module-> params); The result is 结果是

{"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"} 

I think you have too many $ in your echo. 我认为您的回声中有太多美元。 It should be $module->params->get('class_sfx'); 应该是$ module-> params-> get('class_sfx'); watch the $ in from of params. 注意参数中的$ in。

Within the module itself, you can typically just grab the parameters of that module using $params->get('class_sfx') without the $module piece. 在模块本身内,通常可以使用$ params-> get('class_sfx')来获取模块的参数,而无需使用$ module块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM