In this blog we are going to see how to add a parameter to a Joomla component's menu item. This parameter can be used while referring view level in Joomla 2.5.x or 3.x.
Following are the steps to achieve this.
You have to specify parameter / option in your_layout.xml file
in your component.
Lets say, you have to add “pageLimit” parameter to default layout of a view named 'products'. For menu item, you have to create add default.xml for this layout and have to add parameter entry as given below.
a. Add a xml file at location
b. Add following code in above xml file
<?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="All Products View" option="View" > <message><![CDATA[Quick2Cart All Products View]]></message> </layout> <!-- Add fields to the parameters object for the layout. --> <fields name="params"> <fieldset name="advanced" label="COM_MENUS_LAYOUT_FEATURED_OPTIONS"> <field name="pageLimit" type="text" default="20" label="Product Limit" description="Limit to display product on All products view" /> </fieldset> </fields> <state> <name>All Products</name> <description>All Products View </description> </state> </metadata>
After adding the file, this parameter will be displayed while creating menu item for products view. Refer the following screen-shot for this.
How to get menu parameter or options to use in queries?
// Getting menu Param $menuParam = JFactory::getApplication()>getParams(); $pageLimit = $menuParam->get(pageLimit, 10);
Using above code you can get menu parameter / option and can use it accordingly.
I hope this will help you. If there are any questions, feel free to add a comment. :)
JoomlaShine chefs are happy to offer you a new delicious recipe: JSN Gruve - a fresh Joomla template exclusively for restaurant websites. In this article, I will tell you the top 3 features of this mouth-watering template. So, take a quick tour now.
By taking inspiration from classic-combined-with-modern style, the gorgeous interface of JSN Gruve will catch the attention of visitors and hold it longer. JSN Gruve comes with smooth font text, bright color and eye-pleasant design concepts.
The new face of JSN Gruve
Don’t lose your customers just because they can’t view your website on their mobile phone. Your website now will be presented beautifully on any mobile device with the responsive layout of JSN Gruve. This Joomla restaurant template will help you to reach out to your potential customers from the Internet.
JSN Gruve on iPad
JSN Gruve on iPhone
Vik Restaurants is the top Joomla restaurant extension which is rated 5 stars on JED. It's designed to take your restaurant website to a higher level. Vik Restaurants not only helps you list the dishes and the menu, but also controls reservations online. How happy your customer will be when they know that you let them pick a table or order food online for take-away, with a delivery or pickup service.
JSN Gruve has an extended style for Vik Restaurants, which is a perfect combination to make sure that your website is not only powerful but also beautiful.
JSN Gruve and Vik Restaurant
Beside these points, JSN Gruve has many other advanced features that are waiting for you; enjoy yourself. With our Demo Builder tool, you will have 10 days FREE to discover JSN Gruve PRO edition. Just give it a try!
If you own or operate a restaurant, coffee shop, deli, food truck or any kind of food service, JSN Gruve and Vik Restaurant is absolutely the perfect restaurant bundle for you. This bundle is sold by JoomlaShine with a 25% discount. Save money and refresh your restaurant website NOW!
Wednesday, 22 October 2014 12:01
22-Oct-2014 : v5.0.0
+ Added ability to place own styles in the css folder (file will show up in selection)
+ Added extra yes/no select fields for auto-convert options
+ Improved handling of non-embed versions of youtube/vimeo urls
+ [PRO] Added ability to create a link to an article with the title or alias of the article using the article= attribute
+ [PRO] Added ability to create galleries via image classnames
+ [PRO] Added ability to set an auto close in milliseconds with parameter autoclose=
+ [PRO] Added ability to set gallery titles and descriptions for individual images via a data.txt
+ [PRO] Added ability to set link to youtube/vimeo videos by tag parameter youtube= and vimeo=
^ Changed styling of title bar if title is empty
^ Improved handling of tags inside links
^ Improved styling and display of the description
^ Updated ColorBox to version 1.5.14
# Fixed issue with modal window being tiny when width/height are not set in iframe mode on internal urls
# Fixed issue with php warning about Unknown modifier '.' in protect.php
# Fixed issue with plugin not being run over introtext/fulltext on onContentPrepare event
# Fixed issue with plugin not working on jDownloads frontend view
# Fixed issue with quotes in titles and descriptions
# Fixed issue with redirect script not working when not in iframe mode
# Fixed issue with scripts/styles not being removed when no modal links are found
# [PRO] Fixed issue with modal tag with html= parameter sometimes pushing text to new line
Phoca Gallery component version 4.1.2, Phoca Gallery Content plugin version 4.1.2, Phoca Gallery Slideshow plugin version 4.1.2 and Phoca Gallery Button plugin version 4.1.2 have been released.
Copyright © 2014 - NoNumber - All Rights Reserved
Prices are shown without VAT.
21% VAT will be charged on top of the listed prices to residents of the European Union.
The VAT is not applicable to EU residents (outside The Netherlands) with a VIES-registered VAT number.
(In accordance to European Directive 2008/8/EU and its incorporation into EU member states' local laws).
NoNumber.nl is not affiliated with or endorsed by the
Joomla Project or Open Source Matters.
The Joomla name and logo are used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
Menu items may contain traces of nuts.