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

Entity name as label #3

Open
stevelacey opened this issue Jul 31, 2012 · 3 comments
Open

Entity name as label #3

stevelacey opened this issue Jul 31, 2012 · 3 comments

Comments

@stevelacey
Copy link

Perhaps I'm misunderstanding the docs / implementation / source code, but is there no way to specify an entities name or __toString value as a breadcrumb's label?

As far as I can see, you can only use parameters passed in the URL, and beyond that there's no way to customise breadcrumbs from the controller (which I don't really want to have to do anyway).

Am I missing something or is this a glaring omission?

@peterhil
Copy link
Contributor

This is an issue, that should be solved. Using entities might be a reasonable choice to enable more flexibility with the breadcrumbs (as now the children are restricted to have all their parents parameters available to them).

However I don't think that using entities should cause extra database queries, so this might require some more thought about how and when the breadcrumbs are generated.

This bundle was written specifically to avoid cluttering the controller actions with breadcrumb annotations or code.

@stevelacey
Copy link
Author

Agreed on all points, perhaps there is a way to grab the entity from the
DIC when using controller actions that grab them based on URL params.

On Wednesday, 15 August 2012, Peter Hillerström wrote:

This is an issue, that should be solved. Using entities might be a
reasonable choice to enable more flexibility with the breadcrumbs (as now
the children are restricted to have all their parents parameters available
to them).

However I don't think that using entities should cause extra database
queries, so this might require some more thought about how and when the
breadcrumbs are generated.

This bundle was written specifically to avoid cluttering the controller
actions with breadcrumb annotations or code.


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

Steve Laceyhttp://stevelacey.net@stevelaceyhttp://www.twitter.com/stevelacey
/ [email protected]

@barthuttinga
Copy link

Great bundle, but I'm also looking for a way to use other entity representations in the breadcrumb than just the parameters used in the URI. I'm passing in IDs the URI and use Symfony's paramconverter to get entities in my controller. Could this possibly be a starting point for the issue described above? Since the paramconverter is used anyway, there wouldn't be extra queries to the database. I would be willing to give it a try, please give me your thoughts.

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

3 participants