Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Menu changes #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Menu changes #1

wants to merge 1 commit into from

Conversation

seanr
Copy link

@seanr seanr commented Jan 17, 2013

This relatively small commit does two things:

  • Use 'menu' as module name to allow item deletion.
  • Add 'exists: Yes' optionally to items in the YAML to allow new items to be created as children of existing menu items not defined by these fixtures (i.e. subpages of a panel page with its own menu item).

… to allow new items to be created as children of existing ones

// Menu item may be pre-existing to allow adding children to existing item
if (!empty($item_value['exists']) && $item_value['exists'] == TRUE) {
$item = menu_link_get_preferred($item_value['link'], $menu['menu_name']);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use path_load here because panels don't have URL aliases (the function just returns false). There may be a better way to validate the paths here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant