I've created a route:

  path: '/taxonomy/term/{taxonomy_term}/edit'
    _entity_form: 'taxonomy_term.default'
    _title: 'Edit term'
    _admin_route: TRUE
    _entity_access: 'taxonomy_term.update'
    taxonomy_term: \d+

But now I can't add to path anchor attribute.

For example:

path: '/taxonomy/term/{taxonomy_term}/edit#header'
  • Why does it need to be defined in the route? – Kevin Dec 4 '18 at 16:40
  • @Kevin Because it's route for contextual links, and I have two routes for one page with "field_group" tabs. – WiseUA Dec 4 '18 at 16:44

Thanks everyone!

I have solution my for problem. You just had to add it to this my_module.links.contextual.yml file.

  title: Edit this block
  group: region_taxonomy_term
  route_name: regions.taxonomy_term.edit_form_header
  weight: 10
    fragment: 'edit-group-header'

This is not possible because the anchor tag is never sent as part of the HTTP request by any browser, it is only interpreted locally within the browser.

RFC 1808 Section 2.4.1 - "Note that the fragment identifier is not considered part of the URL."

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.