Joomla component not appearing in the menu item types

To create "views" for your component, you have to create some xml files. Inside the templates folder in the frontend part of your component (usually something like /components/com_yourcomponent/views/someview/tmpl), if you had a template named default.php and form.php, you can create a default.xml file and a form.xml file to make these menu items available from the administrator. You can take a look at other components to see the structure of these xml files, but what you should put inside is:

1) A name and a description for four view 2) The params the user will be able to change from the administrator (it works like module/plugin params) 3) You can also set "hidden" request variables for that menu item. It means that those vars will be added to the request in that particular menu item, but the user won't be able to change its value.

Here's a complete example for a component (Joomla 1.7):

    <?xml version="1.0" encoding="utf-8"?>
    <metadata>
        <layout title="COM_AGMTAGS_TAG_VIEW_DEFAULT_TITLE">
           <message>COM_AGMTAGS_TAG_VIEW_DEFAULT_DESC</message>
        </layout>
    <fields name="request" addfieldpath="/administrator/components/com_agmtags/models/fields">
        <fieldset name="request">
           <field name="tag_id" type="agmtag"
            label="COM_AGMTAGS_TAG_FIELD_NAME_LABEL"
            description="COM_AGMTAGS_TAG_FIELD_NAME_DESC"
           />
        </fieldset>
    </fields>
    <fields name="params">
        <fieldset name="basic" label="COM_AGMTAGS_TAG_OPTIONS">
           <field name="layout_type" type="hidden" default="blog" />
       <field name="show_tag_name" type="list"
            label="COM_AGMTAGS_SHOW_TAG_NAME"
            description="COM_AGMTAGS_SHOW_TAG_NAME_DESC"
           >
              <option value="">JGLOBAL_USE_GLOBAL</option>
              <option value="0">JHIDE</option>
              <option value="1">JSHOW</option>
           </field>
           <field name="show_tag_description" type="list"
            description="COM_AGMTAGS_SHOW_TAG_DESCRIPTION_DESC"
            label="COM_AGMTAGS_SHOW_TAG_DESCRIPTION_LABEL"
           >
              <option value="">JGLOBAL_USE_GLOBAL</option>
              <option value="0">JHIDE</option>
              <option value="1">JSHOW</option>
           </field>
           <field name="items_per_page" type="text" default="" />
           <field name="container_class" type="text" default="agmtags-list" />
        </fieldset>
    </fields>
    </metadata>

I hope it helped!


If you simply want to add the view link to the list create a xml file called default.xml inside the com_yourcomponent/views/yourviewname/tmpl/

The xml code below takes two language strings used to display your menu item link in the list

<?xml version="1.0" encoding="utf-8"?>
<metadata>
    <layout title="COM_YOURCOMPONENT_FRONPAGE_TITLE">
       <message>COM_YOURCOMPONENT_FRONPAGE_MSG</message>
    </layout>
</metadata>

save the file and the link should appear in the list of menu items