Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Features
- Create / Modify / Delete menu
- Create / Modify / Delete menu_item
Available Tags
- Menu
- Menu_item
Automatic extraction of patterns files status
Yes, supported since version 7.x-1.x
Examples
Menu Tag
info:
title: Menu operations
description: Add / Edit / Remove a menu to the website
author: QScience
category: Examples
version: 1.0
core: 7.x
author_email: i@me.org
author_website: <a href="http://qlectives.eu">http://qlectives.eu</a>
actions:
- create:
tag: menu
name: footer-links
title: Footer Links
description: Another interesting vocabulary
- modify:
tag: menu
name: menu-footer-links
title: Footer Links
description: Menu description changed.
- delete:
tag: menu
name: menu-footer-links
Menu_item operation
info:
title: menu items operations
description: Create / Modify / Delete menu items
author: QScience
category: Examples
version: 1.0
core: 7.x
author_email: i@me.org
author_website: <a href="http://qlectives.eu">http://qlectives.eu</a>
actions:
- create:
tag: menu_item
menu_name: menu-footer-links
link_path: http://123.com
link_title: menu link title
disable: 1
- modify:
tag: menu_item
menu_name_old: menu-footer-links
link_path_old: http://123.com
link_title_old: menu link title
menu_name: menu-footer-links
link_path: http://123.com
link_title: menu link title changed
disable: 1
- delete:
tag: menu_item
menu_name: menu-footer-links
link_path: http://123.com
link_title: menu link title changed
XML example
<?xml version="1.0"?>
<pattern>
<info>
<title>menu create</title>
<description>creat a menu</description>
<author>liao</author>
<category>menu</category>
<version>1.0</version>
<core>7.x</core>
<author_email>me@i.org</author_email>
<author_website>http://qlectives.eu/</author_website>
</info>
<actions>
<create tag="Menu">
<name>footer-links</name>
<title>Footer Links</title>
<description>Another interesting vocabulary</description>
<hierarchy>0</hierarchy>
</create>
</actions>
</pattern>