Search code examples
urljoomlamenuappendjoomla3.0

Joomla 3 menu item URL appened


Joomla version 3 menu item has a field called "Note" which is primarily used to display notes in the administrator backend.

I have populated "note" field with something like "&City=4&County=0" Now I want to append this in front of the Link URL. Link URL is none editable field which is automatically populated based on article selected so I cannot edit or type in it manually.

Normal URL based upon selection of the article looks like something this:

index.php?option=com_content&view=article&id=10

Now I want to append the note field in front of this URL so the URL would look like:

index.php?option=com_content&view=article&id=10&City=4&County=0

Here is the screenshot:


(source: linkbank.co.uk)


Solution

  • You could make a new view, just copy components/com_content/views/article to cityarticle or something meaningful, then edit the default.xml you find in its subfolder ./tmpl, change the name so you can identify it and add the fields city and county to the

    on line 16 roughly, those will appear when you create a new menu item (on the right) so you can set them, and will be passed on as get requests.

    Choose the appropriate field type and read the docs here: http://docs.joomla.org/Standard_form_field_and_parameter_types