Hello
i can use Token for "Paths to replace with custom breadcrumbs"
Issue fork easy_breadcrumb-3088784
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
korzh-nick commentedComment #3
greg boggsCan you open a merge request?
https://www.gregboggs.com/drupal-merge-requests/
Comment #4
greg boggsThis one probably also needs a dependency added on token
Comment #5
almador commentedHi!
Big thanks for the module!
I've checked 2.0.3 and 2.x-dev and it seems that tokens are not supported yet?
I was hoping to use the tokens in "Titles to be replaced while generating segments" setting.
Comment #6
greg boggsMerge requests encouraged :)
Comment #7
almador commentedI've tried with #2 solution, but didn't get it to work.
1. Added to public function getTitleString (in file EasyBreadcrumbBuilder.php)
2. Added in file easy_breadcrumb.info.yml
3. At admin/config/user-interface/easy-breadcrumb
in section Titles to be replaced while generating segments
provided replacement pattern:
{{ field_category_in_english }}::{{ field_category }}Fields are from my view.
4. In easy_breadcrumb.services.yml
added:
'@token',5.
drush crComment #8
greg boggsCan you open a merge request?
Comment #10
greg boggslooks like a merge error.
Comment #11
ankitjhakal commentedComment #12
ankitjhakal commentedComment #14
bbu23Hi, sorry, I'm in a bit of a hurry now, but this seems like a good place for adding tokens to fields. I know that the original issue needs tokens for "Paths to replace with custom breadcrumbs", but I need for "Home" and do not have time right now to do it for that as well. But I do want to push my changes here as a starting point, there are multiple things that should be done, and maybe this issue could be converted to something like "Tokens everywhere" or at least where possible.
My commit is not final, requieres dependency injection and module dependency. Will come back to it later if maintainers/the community are interested in using tokens in fields.
Comment #15
spuky commentedto keep everybody updated there is an issue in Dynamic breadcrumb to merge into EB which should bring token support to EB so maybe we should focus on one solution...
Comment #16
spuky commented@bbu23 thanks for bringing up your MR once #3467372: Merge Dynamic breadcrumb is ready we will have a dependency on Token... and can work on making tokens work in more places...
Comment #17
bbu23@spuky sure! I needed it for the update.
Cool, that will be great!