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

Remove relationship from breadcrumb #8

Open
RenoLooijmans opened this issue Jul 17, 2022 · 7 comments
Open

Remove relationship from breadcrumb #8

RenoLooijmans opened this issue Jul 17, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@RenoLooijmans
Copy link

First of all - thanks for this great package!

Is it possible to somehow remove the relationship in the breadcrumb? I've tried it with modifying the config as well as addin the method parent returning null, but this does not seem to work as expected.

public function parent() {
     return null;
}

To clarify, I'd like to remove the belongsTo relationship in the breadcrumb:

image

Secondly, it seems that lenses are not supported?

@ianrobertsFF
Copy link
Contributor

Lenses aren't currently supported, I have some to implement in the next couple of weeks, so I'll be taking a look at lens support then. If you need it sooner you're welcome to submit a PR.

Is it a specific parent resource you're looking to exclude? IE:

Home -> Crumb 1 -> Crumb1:A -> Crumb 2 -> Crumb2:A -> Crumb 3

Or are you looking to exclude all parents for a resource? IE:

Home -> Crumb 1 -> Crumb1:A -> Crumb 2 -> Crumb2:A -> Crumb 3

@RenoLooijmans
Copy link
Author

Thanks for your quick reply! I'm just getting into Nova so I'm afraid I'm of no help at this moment..

For this specific resource I'm looking to exclude all parents. But I guess either will suffice.

@ianrobertsFF
Copy link
Contributor

No problem, ill leave this open and close it when I've done the changes to allow for lenses.

Just testing an additional static attribute on your resource called resolveParentBreadcrumbs that when set to false will disable all parent breadcrumbs from that resource.

It satisfies the second option in the examples I gave above and would be used on the Crumb 3 resource to disable all parent resource breadcrumbs.

@ianrobertsFF
Copy link
Contributor

Okay the change for resolveParentBreadcrumbs is in release 1.0.3.

Ill reply here when the Lens support is added.

@ianrobertsFF ianrobertsFF self-assigned this Jul 17, 2022
@ianrobertsFF ianrobertsFF added the enhancement New feature or request label Jul 17, 2022
@ianrobertsFF
Copy link
Contributor

I've been looking into Lens support, and whilst its trivial to add the breadcrumbs to the Lens view itself, there is no feedback given when you navigate from a Lens to a resource detail that you have come from the Lens, rather than the Index page for the resource.

As such its not possible to automatically send the user back to the index or lens depending which they originally came from.

I'll try and see if theres anything on the inertia side I can intercept to pass off to the breadcrumbs card. I did some work on this for nova-tabs, just gotta remember how it works and see if its possible.

@RenoLooijmans
Copy link
Author

I've been looking into Lens support, and whilst its trivial to add the breadcrumbs to the Lens view itself, there is no feedback given when you navigate from a Lens to a resource detail that you have come from the Lens, rather than the Index page for the resource.

As such its not possible to automatically send the user back to the index or lens depending which they originally came from.

I'll try and see if theres anything on the inertia side I can intercept to pass off to the breadcrumbs card. I did some work on this for nova-tabs, just gotta remember how it works and see if its possible.

Got it. Sounds rather complex. More than I would've guessed at least.

Thanks for you effort though!

@AbdallahAli912
Copy link

just use
public static $resolveParentBreadcrumbs = false;

will disable parents breedcrumps

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

No branches or pull requests

3 participants