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

Custom menu links to target new pages, ect outside the admin #321

Closed
davemathews opened this issue Aug 26, 2013 · 2 comments
Closed

Custom menu links to target new pages, ect outside the admin #321

davemathews opened this issue Aug 26, 2013 · 2 comments

Comments

@davemathews
Copy link
Contributor

Can we get a way to have links in the menu array that will output to a new page outside the admin?

@janhartigan
Copy link
Member

Probably not a bad idea. What I'm thinking of doing in the next major version is something like this:

  • Anything prefixed with model. looks for configs in the model_config_path
  • Anything prefixed with settings. looks for configs in the settings_config_path
  • Anything prefixed with page. looks for custom views
  • Anything that quacks like a URL gets displayed as a link

This would allow us to do something like this:

'menu' => array(
    'model.whatever',
    'settings.whatever',
    'Page Title' => 'page.my.view',
    'Link Title' => URL::route('some_route')
)

This would require some small adjustments in the assumptions made in the getMenu() method, namely that if some menu item is a string, it may not necessarily be a model or settings config item.

@davemathews
Copy link
Contributor Author

That is perfect and what I was looking into going down my path. Good call!!!

Sent from my iPhone

On Aug 26, 2013, at 4:27 PM, "janhartigan" <[email protected]mailto:[email protected]> wrote:

Probably not a bad idea. What I'm thinking of doing in the next major version is something like this:

  • Anything prefixed with model. looks for configs in the model_config_path
  • Anything prefixed with settings. looks for configs in the settings_config_path
  • Anything prefixed with page. looks for custom views
  • Anything that quacks like a URL gets displayed as a link

This would allow us to do something like this:

'menu' => array(
'model.whatever',
'settings.whatever',
'Page Title' => 'page.my.view',
'Link Title' => URL::route('some_route')
)

This would require some small adjustments in the assumptions made in the getMenu()https://github.com/FrozenNode/Laravel-Administrator/blob/master/src/Frozennode/Administrator/Menu.php#L42 method, namely that if some menu item is a string, it may not necessarily be a model or settings config item.


Reply to this email directly or view it on GitHubhttps://github.com//issues/321#issuecomment-23290774.

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

No branches or pull requests

2 participants