Peter
Peter

Reputation: 11

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:

<?xml 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

Upvotes: 1

Views: 1524

Answers (2)

sizlah101
sizlah101

Reputation: 29

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>

Upvotes: 2

Gaurav
Gaurav

Reputation: 28755

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

Upvotes: 0

Related Questions