Q - How to display frontend menu in Joomla 5 custom component ?
โพสต์แล้ว: 02/01/2025 12:14 am
In my Joomla 5 custom component, I have created an XML file for the frontend menu for the component as well as follows.
example - components/com_hello/tmpl/tests/default.xml
And when I set up frontend menu item, it displays on the frontend as follows:
I can't make changes to Joomla core files like mod_menu. I need to fix this only within my component. How can I fix it?
example - components/com_hello/tmpl/tests/default.xml
โค้ด: เลือกทั้งหมด
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<layout title="COM_HELLO_TEST_LIST">
<message>
<![CDATA[COM_HELLO_TEST_LIST_DESC]]>
</message>
</layout>
</metadata>
โค้ด: เลือกทั้งหมด
Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in my_project_path\modules\mod_menu\tmpl\default_component.php on line 72
Hello