当前位置 : 主页 > 网页制作 > xml >

xml – Joomla,为特定视图添加任务参数

来源:互联网 收集:自由互联 发布时间:2021-06-13
我尝试添加url参数task =所有车辆,但是在创建了此视图的菜单链接后,任务参数仍然不存在 ?xml version="1.0" encoding="utf-8"?metadata layout title="Multiple Categories" message![CDATA[Displays a selected categori
我尝试添加url参数task =所有车辆,但是在创建了此视图的菜单链接后,任务参数仍然不存在

<?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>
你可以尝试这个 –

<!-- 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>
网友评论