DescriptionAdd to Menu is an Administrator module. You will get an extra link in the top right of your Administrator to quickly add a menu item link of the page you are viewing. The link looks like: The link will only show up on a page if there is a component template file available for it in Add to Menu.
PS: I know, I know, there is next to no documentation besides what you see here. Sorry... still have to write more on this. If you have any questions, please just ask me via the forum. XML filesCreating component template XML filesAdd to Menu is an administrator module that gives you the possibility to quickly add menu items of the item you are viewing at that particular moment. Add to Menu supports a large number of page types by default. Of course the standard content types (sections, categories, articles, contacts, users, polls, etc) are supported. But also a selection of 3rd party components like FLEXIcontent, K2, MyBlog and RedShop. More will be added in future releases. If you need the functionality of Add to Menu for a component it does not yet support, you will have to make one or more component template files (xml) for Add to Menu. In this reference guide you will learn how you can do that. File and folder structureOnce Add to Menu is installed, you can find a folder called 'components' in the Add to Menu module folder (administrator/modules/mod_addtomenu/components). If you are viewing a page in your administrator interface, Add to Menu will search for a folder matching the component (option) of that page. If there is a folder, it will go through the template files contained in that folder. As soon as it finds one that passes the requirements as defined in the 'requirements' section, it will use that component template (and will stop looking further in the folder). For example, when viewing the administrator url index.php?option=com_categories§ion=com_content Add to Menu will search through the folder 'com_categories'. And when viewing index.php?option=com_virtuemart&page=product.product_list Add to Menu will search through the folder 'com_virtuemart'. As for file names, it is not too important what you call these template files. You may label them using your own naming scheme, as long as they end in '.xml' (For example, 'category.xml' or 'addcategory.xml'). Add to Menu goes through the files in alphabetical order, so you can use the names to control the order. Template filesThe template file is an xml file containing all the information for Add to Menu to let it know when to show the Add to Menu button, what to show in the modal popup window and with what data it should create the menu item. In this section all parts of the xml file are explained. There is an example.xml file (in administrator/modules/mod_addtomenu/components/example) which you might want to look into. Also take a look at the already available template files (like for com_content) to see how things are done. Inside the main <addtomenu> tags you can find general information tags and the <params> tag. Only the information inside the <params> tag is used by Add to Menu. The general information is not necessary, but can help you understand what the template is for and who made it. This also holds the copyright information. Maybe this information can be used in future versions of Add to Menu. Within the <params> tag, there are 7 sets of information, each affecting the different aspects of creating and storing a link when using the Add to Menu button. 1) Name <name>This is displayed as the type of menu item in the header of the modal popup window (and in the tooltip). It is best to use the same name as is displayed as menu item type in the 'Select Menu Item Type' list (visible when adding a new menu item to a Joomla menu). But you can name this how you want. <name>Standard Product Layout</name> 2) Adjust Height <adjust_height>The height of the Add to Menu modal popup window is dependent on the number of (extra) options. If – for whatever reason – the modal popup window does not get the right size, you can use this tag to adjust it. Positive numbers will increase, negative numbers will decrease the height with so many pixels. <adjust_height>12</adjust_height> 3) Requirements <required>This set of values determines whether or not the template should be used on the page.
Usually all request parameters are present in the url (GET). But some pages are opened via POST and you will only see index2.php as url. Then you will have to know/find out what parameters and values are passed on to the page. For instance by looking in the html source of the page before (form elements). This is the syntax for every parameter and value set. <parameter>value</parameter> Multiple valuesIf multiple values are possible to pass requirements, just separate the values with comma's. <type>articles,items</type> Any valueIf any value is ok (except empty), use the wildcard '*'. <cid>*</cid> If any value except empty, 0 or false is ok, use the wildcard '+'. <catid>+</catid> Not presentIf you want to check for pages that do not have a certain parameter set, just leave the value empty. <task></task> Requirements exampleFor example, if you want to match an url like:
<required> As you might have noticed, 'cid' is enough to match 'cid[]'. 4) Database select <dbselect>The actual menu item that is created consists of the name, alias, url and extra parameters. The <dbselect> part searches for the name (and alias) that has to be used. The name can be defined as a generic fixed word. <dbselect> Add to Menu will create the alias based on the name the way you are familiar with in Joomla. If you want to use a different alias than one based on the name value, you can define it separately. <dbselect> But it is of course much nicer if the name (and alias) is grabbed from the name or title of whatever item you are viewing. You can tell Add to Menu where to get this information from the database. First define which database to search in. <table>#__categories</table> Then use the <where> tags to limit the search results to 1 item. <where> And then you can define what table field contains the name (and optionally what field contains the alias). <name>title</name> So to wrap it up, the full <dbselect> tag in this example. <dbselect> 5) Extra options <extras>This is where you can define extra options to display within the Add to Menu modal popup window. These extra values that the user can select can be used in the final url or in the extra parameters of the menu item. Each extra option uses an <extra> tag inside the <extras> tag. First define the label of the option in the <name> tag. This label will be placed before the form element. <name>Layout</name> Then set the type of the form element. You can choose from text, textarea, hidden, select and radio. <type>select</type> Then you have to define the parameter name. This name can be used later on in the url and extra parameters of the menu item. <param>layout</param> And finally you define the value(s) of the parameter. <value>1</value> For element types select and radio, place the <value> tags within a <values> tag. You can have one or multiple <value> tags. Each <value> tag has a name and value defined inside. <values> You can also use a <style> tag to add some custom styling to the element. <style>width:50px;</style> Here is a full example of what an extra 'Layout' select box would look like. <extras> In this case a Layout parameter will be available. You can use the value (which will either be empty or 'blog') via the variable $layout. You can also hide/show certain extra fields depending on the value of another. So, for example, if you want to show an extra text field if the user selects 'Blog Layout' from the Layout select field, you can! The syntax for this show/hide (toggler) option would in this case be: <extra><type>toggler</type><param>layout</param><value>blog</value></extra> The first line is telling Add to Menu that the extra text field should be shown when the 'layout' variable has been assigned the value 'blog', or in other words, if 'Category Blog' has been selected in the select drop down menu. The last line closes the toggler area. 6) URL parameters <urlparams>Here you can define how the url part of the menu item will be built up. You can use any available variables from the request (GET/POST), user states, but also from the extra options we just discussed. So you can just define all url parameters (name + value) in the order you need them. <urlparams> This will result in an url that looks like: index.php?option=com_content&view=category&layout=blog&id=12 (where layout and id are variable) 7) Menu item parameters <menuparams>The final part defines what other menu item parameters need to be set. Again, you can use all available variables from the request (GET/POST), user states and the extra options. The parameters you can set can be found in the xml file that of the actual component view. For example, in the folder components/com_content/views/category/tmpl, the parameters for the Standard Category layout are stored in the 'default.xml' file, while the ones for Category Blog layout are in the 'blog.xml' file. Another way you can find the available parameters id to look in the html output of the menu item edit page. The third option is to look in the menu table in the database. The parameters are stored in the params field. An example of what the <menuparams> set might look like. <menuparams> You will find what parameters are available and the possible values you can assign to them for the component in the XML file of that component's view, as the params are actually the names given to each parameter in the XML file. Tutorials
FAQ'sI have a new article (or section or category), but I don't see the Add to Menu link?
Does Add to Menu also work on K2, SOBI, Joomsuite Resources, ...?
SpecsSpecificationsAdd to Menu is a Joomla extension compatible with Joomla 1.5, Joomla 1.7 and Joomla 2.5. The extension consists of:
RequirementsAdd to Menu will only work correctly if your setup meets these requirements:
Using PHP 5.2 (or lower)? I can not provide support for setups that do not meet the above requirements. The core Joomla files should of course not be altered in any way. InstallationThe easiest way to install/update is via the NoNumber! Extension Manager. If you have problems installing Add to Menu, please try the manual installation process as described here: Otherwise, please report this on the forum or let me know via the contact form. UpdatingIf you want to update to the latest version, you do not have to uninstall first. The easiest way to install/update is via the NoNumber! Extension Manager. You can also update simply by installing the package via the Joomla core installation process. DowngradingIf for some reason you need to downgrade, it is best to uninstall the extension first. Also, you will have to uninstall the NoNumber! Framework plugin (system) (and the NoNumber Elements plugin if you have it installed). After that you can simply install the older version zip file. Please note that I cannot not provide support on older versions! Open Source LicenseAdd to Menu is an Open Source Joomla extension. It is in compliance with the GNU/GPL license: Joomla is also Open Source. SupportNeed more help?Before requesting help, make sure your installation and setup meet the requirements (see the Specs) and your extensions are up-to-date. If you need more help, please take a look in the NoNumber! Forum. You can also contact me via the contact form or via chat (if I'm online). ChangelogChangelog + = Added ! = Removed ^ = Changed # = Fixed
10-Jan-2012 : v1.9.6 # Fixed issue with access to popup being denied to certain groups (Joomla 1.7+) # Fixed issue with installer not removing the folder/zip from the tmp 09-Jan-2012 : v1.9.5 ^ Updated translations: nb-NO # Fixed issue with title with quotes being stripped 23-Dec-2011 : v1.9.4 # Fixed issue with assignment options not showing on mootools 1.2+ setups 22-Dec-2011 : v1.9.3 # Fixed issue with button not showing up on article edit pages (Joomla 1.5) 21-Dec-2011 : v1.9.2 ^ Updated translations: fr-FR # Fixed issue with menu items created in top level not having correct level assigned (Joomla 1.7) # Fixed issue with styling of the admin status module # Fixed issue with errors on duplicate aliases being unreadable 05-Dec-2011 : v1.9.1 # Fixed issue with core search pages not working because of !NoNumber! Framework 01-Dec-2011 : v1.9.0 + Joomla 1.7 compatible! ^ Updated translations: es-ES ^ Cleaned code syntax (no longer guaranteed support for php 5.2.x and lower) 08-Oct-2011 : v1.8.1 # Fixed security issue in !NoNumber! Framework plugin 08-Oct-2011 : v1.8.0 ^ Improved installer ^ Moved translation language files to main package (no more language packs) ^ Cleaned up some code (like no more use of DS) # Fixed issue with non-translated strings showing on non-English setups 16-Sep-2011 : v1.7.0 + Added check to see if there is a component file inside the specific components folder + Added options to adjust modal popup size ^ Made popup a little wider ^ Changed way !MooTools version is detected ^ Changed !NoNumber! Elements plugin to !NoNumber! Framework ^ Moved common language strings to !NoNumber! Framework files 25-Mar-2011 : v1.6.1 ^ Changed language files to be J1.6 ready 10-Feb-2011 : v1.6.0 ^ Changed extension icon / logo # Fixed issue with public access to popup page (security fix!) 11-Dec-2010 : v1.5.1 # Fixed issues with document being called to early # Fixed some issues with loading of language strings # Cleaned up some code 25-Nov-2010 : v1.5.0 + Added checks to see if !NoNumber! Elements plugin is installed/enabled ^ Fixed and updated all language strings ^ Changed display of menu item list # Fixed issue with toggle script for extra options not working 16-Nov-2010 : v1.4.0 ^ Made !MooTools 1.2 compatible 28-Sep-2010 : v1.3.0 + Added component files for redShop + Added ability to change the text shown as link in the status bar + Added a tooltip that shows some info on the link that will be added + Added extra blog settings for categories / sections + Added possibility to show/hide extra options depending on a fields value + Also checks cookies for selected filters ^ Changed component files from php to xml ^ Improved overall code # Fixed a few component files 24-Jul-2010 : v1.2.4 ^ Changed way version and license information are displayed (now via ajax) ^ Changed way versions and licenses are checked (no more base64) # Fixed issue with button not showing when used i.c.w. some other extensions 22-May-2010 : v1.2.3 # Fixed issue with syntax errors in xml files (causing problems in admin module manager) 13-May-2010 : v1.2.2 # Fixed issue with button not showing on all !FLEXIcontent article / category pages # Fixed issue with errors about registry for php 5.0.5 09-Feb-2010 : v1.2.1 # Fixed location of Joomla! DTD files # Fixed issue with deprecated syntax for php 5.3+ 18-Jan-2010 : v1.2.0 ^ Moved elements to separate global plugin (also used by other extensions) ^ Changed the License Code check (now controlled by the License Manager) ^ Made requirements array smarter to match components Commercial LicenseAdd to Menu is completely free and you DON'T need a Commercial License Code to use it. However, if you use my extensions on websites that you make money from, I would appreciate it if you purchase a License Code. Note: If you don't want to pay for the License Code and want to continue to use the extension for free, please do. You will just have to ignore the license message in the administrator. Note: If you have donated before and feel you should get some reduction on the price, please contact me about it... we'll sort it out :)
Here you can see the difference between the use of the extensions without and with Commercial License Code.
DownloadDownloadsAdd to Menu is compatible with Joomla 1.5, Joomla 1.7 and Joomla 2.5 NOTE: Add to Menu needs PHP 5.3+. Please see the specs for more requirements.
Please clear your browsers cache after updating an extension. NOTE: Joomla 1.6 is no longer supported. Joomla 1.6 reached end-of-life in August 2011. If you have a site running on Joomla 1.6 you are urged to upgrade to Joomla! 2.5. Add to Menu will probably still work on Joomla 1.6, but any issues specific to Joomla 1.6 will not be fixed. Tip!Are you using multiple NoNumber! extensions? LanguagesThis extension comes with the following languages:
No language pack for your language?I welcome you to help out and get involved with translations for NoNumber! extensions. I am using Transifex for the translations of all NoNumber! extensions. So I kindly ask you to join Transifex. There is a translation team/group set up especially for Joomla projects: OpenTranslators. To join, see the different steps on the right under: Translator Guide: http://opentranslators.org/en/how-to You can find all the NoNumber! projects here: https://www.transifex.net/projects/tag/nonumber/ All language files will be updated and packed with every new release of the individual extensions. |