This tutorial explains how to create a Joomla menus import template, add the fields and how to run the import. Step by step we show you how to perform each task. A video will show you the steps in action so you can follow that as well.
Creating the template
A template can be created by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click New
- Give the template a name
- Set Action to Import
- Set Component to Joomla Menus
- Set Operation to Menu
- Click Next: Select Source
- Source is set default to Load from your computer. No need for change.
- Click Next: Select options
- The default values are OK, change if needed.
- Click Next: Select fields
- Nothing needed here as we set to Use column headers as configuration in step 10.
- Click Next: Finalize
- All done here
- Click Close to return to the list of templates or Edit if you want to fine-tune the template further.
Adding the template fields
Template fields can be added by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click on Template fields
- In the Search Tools select your template
- Click on New to add a single field or click on Quick Add to add multiple fields.
Quick Add
The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.
Required fields
- type
- path
- menutype
Criteria
- type
- path
- menutype
Run the import
The import can be run by following these steps:
- Go to Components -> RO CSVI -> Import
- Select the template created earlier
- Click Select file
- Select the file to import
- Click Preview
- You now see a preview of the file as to how RO CSVI sees the file
- Click Start import
- The import is run
- The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template
Video showing the process
Examples
"alias","component","language","level","link","menutype","menu_image","menu_text","path","title","type"
"home","com_content","*","1","index.php?option=com_content&view=featured","mainmenu","","Y","home","Home","component"
"test-article","com_content","*","1","index.php?option=com_content&view=article&id=1","mainmenu","","Y","test-article","Test article","component"
Example file
Delete a menu
With RO CSVI Menu import it is also possible to delete the existing menu items. Use field menu_delete with value Y in import to delete a menu item.
Example for menu delete
"alias","menutype","path","title","type","menu_delete"
"home","mainmenu","home","Home","component","Y"
"test-article","mainmenu","test-article","Test article","component","Y"
Please note that Joomla saves alias as path when saving the menu. So even if you have a path set in import file, when storing the menu Joomla builts the path using alias field. To update existing Joomla menu, use the path as stored by Joomla.