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

Make nav helper more friendly and filterable for plugins and themes. #1125

Merged
merged 2 commits into from
May 27, 2013
Merged

Make nav helper more friendly and filterable for plugins and themes. #1125

merged 2 commits into from
May 27, 2013

Conversation

solarissmoke
Copy link
Contributor

Hi,

Currently, the navigation menu generated by the nav helper cannot be filtered - meaning that it's not possible to modify the default menu items or change their ordering without generating the whole thing yourself.

It would be helpful if all the menu items could be filtered. The attached code also cleans up how the HTML is generated to remove redundancy.

}
$menu_items[] = array(
'page' => 'home',
'url' => $site.'main',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather see url::site() used properly like
'url' => url::site('main'),

Same for other links

@rjmackay
Copy link
Contributor

Looks good. Definitely a sensible change.
I've added some minor feedback about use of url::site(). If you can incorporate that I'll be happy to merge this in

@solarissmoke
Copy link
Contributor Author

@rjmackay done.

@rjmackay
Copy link
Contributor

Great - merging it in

rjmackay added a commit that referenced this pull request May 27, 2013
Make nav helper more friendly and filterable for plugins and themes.
@rjmackay rjmackay merged commit b862e0c into ushahidi:develop May 27, 2013
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.

2 participants