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

In Admin, the link home redirect to root site. #15

Open
multiarts opened this issue Jun 25, 2016 · 8 comments
Open

In Admin, the link home redirect to root site. #15

multiarts opened this issue Jun 25, 2016 · 8 comments

Comments

@multiarts
Copy link

In the case also use the admin, but the Home link for example the route always goes to example.com and not to example.com/admin.
How to solve this?

@mjanssen
Copy link
Owner

Home (the first breadcrumb) refers to the base-url (example.com). The second breadcrumb would be "Admin" in this example. Which would refer to example.com/admin.

Could you please explain your question a bit more and/or provide some code? Are you using Breadcrumbs::automatic();?

@multiarts
Copy link
Author

Yes, I'm using Breadcrumbs::automatic() for both front and admin.

@mjanssen
Copy link
Owner

What would you like to do with the breadcrumbs?

@multiarts
Copy link
Author

That the admin home redirect to the admin.
From: Home / Category / Music and not Home / Admin / Category / Music

@mjanssen
Copy link
Owner

The Breadcrumbs::automatic(); builds the breadcrumbs by the current URL. So if your url is example.com/admin/category/music, your breadcrumbs will be Home (example.com) / admin (example.com/admin) / category (example.com/admin/category) / music (example.com/admin/category/music).

If you want to build the breadcrumbs in a different order (or leaving out / adding one), I suggest building the breadcrumbs within your constructor or function which is called.

@mjanssen
Copy link
Owner

I could update the package so you'll be able to set a base-url, if you want to.

@multiarts
Copy link
Author

ok, would be great and thank you for your time and attention, I will study more code and contribute.

Att, John Mello

@mjanssen
Copy link
Owner

You can update your local package to the latest one (composer update). This version contains an option to set the set the home url base (Breadcrumbs::setHomeUrlBase("admin");). Remember to set the base before generating the breadcrumbs.

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

No branches or pull requests

2 participants