简体   繁体   English

Joomla自定义菜单,带有php和mysql查询

[英]Joomla custom menu with php and mysql query

I'm working on a project based on Joomla. 我正在基于Joomla进行项目。

We are not using the joomla register/login default form, instead we have created a custom registration/login system based on our mysql tables. 我们没有使用joomla注册/登录默认格式,而是基于mysql表创建了一个自定义注册/登录系统。

We need to dynamically modify the joomla main menu: 我们需要动态修改joomla主菜单:

we have to change the menu items if an user is logged in (we see if an user is logged by checking some values in the session and testing tokens), so we need to make a mysql query and then alter the menu items dynamically. 如果用户已登录,我们必须更改菜单项(我们通过检查会话中的一些值并测试令牌来查看用户是否已登录),因此我们需要进行mysql查询,然后动态更改菜单项。 How can we should do this ? 我们应该怎么做呢? Is even possible to insert custom php code in the joomla main menu ? 甚至可以在joomla主菜单中插入自定义php代码?

通过编辑文件/modules/mod_menu/helper.php解决

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

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