421 seo#235
Draft
tijsverkoyen wants to merge 5 commits into
Draft
Conversation
Contributor
Reviewer's GuideRefactors breadcrumb and title listeners to use controller argument-based resolution instead of Doctrine/MapEntity, updates docs to match the new behavior, switches listeners to the kernel.controller_arguments event, and inlines the HTML head section into all base templates for better SEO control and CSP integration. Sequence diagram for controller_arguments-based breadcrumb and title resolutionsequenceDiagram
actor User
participant HttpKernel
participant BreadcrumbListener
participant TitleListener
participant BreadcrumbTrail
participant PageTitle
participant Fallbacks
participant TwigTemplate
User ->> HttpKernel: HTTP request
HttpKernel ->> BreadcrumbListener: onKernelControllerArguments(ControllerArgumentsEvent)
BreadcrumbListener ->> BreadcrumbTrail: reset() [main request]
BreadcrumbListener ->> BreadcrumbListener: processAttributeFromMethod(method, class, namedArguments, request, route)
BreadcrumbListener ->> BreadcrumbListener: generateBreadcrumb(breadcrumbAttribute, namedArguments, request)
BreadcrumbListener ->> BreadcrumbListener: resolveRouteParameters(breadcrumbAttribute, namedArguments, request)
BreadcrumbListener ->> BreadcrumbTrail: add(Breadcrumb)
HttpKernel ->> TitleListener: onKernelControllerArguments(ControllerArgumentsEvent)
TitleListener ->> TitleListener: resolveMethod(controller)
TitleListener ->> TitleListener: processTitle(titleString, namedArguments)
TitleListener ->> TitleListener: getTitleFromParent(Route, namedArguments)
TitleListener ->> Fallbacks: get("site_title")
Fallbacks -->> TitleListener: site_title
TitleListener ->> PageTitle: setTitle(resolvedTitle + " - " + site_title)
HttpKernel -->> TwigTemplate: render(base.html.twig)
TwigTemplate ->> PageTitle: __toString()
PageTitle -->> TwigTemplate: page_title
TwigTemplate ->> TwigTemplate: <title>{{ page_title }}</title>
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Align breadcrumb and title handling with controller arguments and improve SEO-related markup and documentation.
Enhancements:
Documentation: