4

我尝试添加 url 参数 task=all 车辆,但是在创建此视图的菜单链接后,任务参数仍然不存在

<?xml version="1.0" encoding="utf-8"?>
<metadata>
    <layout title="Multiple Categories">
        <message><![CDATA[Displays a selected categories of an application]]></message>
    </layout>

    <fields name="params">
        <fieldset name="params" addfieldpath="/administrator/components/com_vehiclemanager/elements" label="Params">
            <field name="categorylayout" type="categorylayout" default="1" class="inputbox" label="Select layout" multiple ="false" size="1" description="Choose a layout" required="false" />
            <field name="back_button" type="list" label="Back Button" required="false" description="Show/Hide a Back Button" >
                <option value="">Use Global</option>
                <option value="0">Hide</option>
                <option value="1">Show</option>
            </field>
            <field name="single_category" type="category" default="1" class="inputbox" label="Category" multiple ="true" size="1" description="Choose a vehicle Categories" required="true" />
        </fieldset>
    </fields>
    <url>
        <param name="task" value="all_vehicles" ></param>
    </url>
</metadata>
4

1 回答 1

4

你可以试试这个-

<!-- Add fields to the request variables for the layout. -->
<fields name="request">
    <fieldset name="request">    
        <field name="task" type="hidden"
            label=""
            required=""
            description=""
            default="all_vehicles"
        />
    </fieldset>
</fields>
于 2013-01-15T09:31:12.283 回答