1

I have frontend views on a custom component. When I add a menu item for that view, I want a tab with custom paramaters. The field type will be sql.

This is what I have thus far:

<?xml version="1.0" encoding="utf-8"?>
<metadata>
        <layout title="Site Route Link" hidden="false">
                <message>A menu link to a route created in the backend.</message>
        </layout>
        <fields name="Route Settings">
            <fieldset name="Route Settings">
                <field name="route_id" type="sql" label="Select a route" description="Select a route previously created in the backend." query="SELECT id AS value, route_name AS route_id FROM #__cddir_routes where id_type = 1"/>
            </fieldset>
        </fields>
</metadata>

The tab is created in the menu item, but it is empty. (This is when creating the menu item) Can you perhaps see what I am doing wrong?

Thanks

Jacques

3

Try removing the blank spaces in fields name and fieldset name attributes

<fields name="RouteSettings">
   <fieldset name="RouteSettings">
        <field name="route_id" type="sql" label="Select a route" description="Select a route previously created in the backend." query="SELECT id AS value, route_name AS route_id FROM #__cddir_routes where id_type = 1"/>
   </fieldset>
</fields>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.