开发者

Menu parameters in Joomla 1.6

I create a menu link to view and the URL looks like: http://example.com/index.php?option=com_example&view=homepage&layout=list.tpl&Itemid=154

And i want do add a parameter to a link that looks like: http://example.com/index.php?option=com_example&view=homepage&layout=list.tpl&task=search&Itemid=154

I mean specifically this parameter "task=search".

What should I add to the xml file to create the link above.

My list.tpl.xml:

<?xm开发者_StackOverflow中文版l version="1.0" encoding="utf-8"?>
<metadata>
        <layout title="Latest List">
                <message>
                        Latest Listings
                </message>
        </layout>
        <state>
            <name>Latest</name>
            <description>Search form with latest listings</description>
            <url>

            </url>
            <advanced>
            </advanced>
    </state>

</metadata>

Thank you in advance for your help


The following will only work in Joomla 1.5 ...

<url>
    <param name="task" type="hidden" default="search" />
</url>

The equivalent of this in Joomla 1.6/1.7 is ...

<fields name="request">
    <fieldset name="request" label="Basic Parameters">
        <field name="task" type="hidden" default="search" />
    </fieldset>
</fields>

The defining parts being name="request" of both <fields> and <fieldset>


<url addpath="/components/com_payplans/elements">
    <param name="task" type="hidden" default="taskValue" />
</url>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜