Reputation: 9055
How do I create menu entries in joomla component for different views?
Let's say I have a main view which is assignable from Menu Manager and than I have a second view com_my/views/second/
and I want to have as option as well when I call the component from menu manager.
Upvotes: 0
Views: 57
Reputation: 1345
Inside the tmpl
directory of each view add an xml
file that has the same filename as the layout you want to create the menu for, that looks like this:
<?xml version="1.0" encoding="utf-8"?>
<metadata>
<layout title="COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_TITLE">
<message>
<![CDATA[COM_HELLOWORLD_HELLOWORLD_VIEW_DEFAULT_DESC]]>
</message>
</layout>
</metadata>
For example if the desired layout is named default.php
the above would be named default.xml
you can find more info here.
Upvotes: 2