Conversation
|
Leaving these here for reference: src/Page/src/Handler/PageHandler.php $routeName = $request->getAttribute(RouteResult::class)->getMatchedRouteName();
return new HtmlResponse(
$this->template->render(str_replace('page.', 'page::', $routeName))
);src/Page/src/RoutesDelegator.php $app->get('/page/about', [PageHandler::class], 'page.about');
$app->get('/page/who-we-are', [PageHandler::class], 'page.who-we-are');src/App/templates/layout/default.html.twig <div class="dropdown-menu" aria-labelledby="pageDropdown">
<a class="dropdown-item" href="{{ url('app.index') }}">Home</a>
<a class="dropdown-item" href="{{ url('page.about') }}">About Us</a>
<a class="dropdown-item" href="{{ url('page.who-we-are') }}">Who We Are</a>
</div>We'll comment on them today during the TSC meeting. |
|
Summary:
|
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
| {% extends '@layout/default.html.twig' %} | ||
|
|
||
| {% block title %}{{ status }} {{ reason }}{% endblock %} | ||
| {% block canonical %}{% endblock %} |
There was a problem hiding this comment.
@arhimede
It's not a 404 page, so we have a matched route, which means that we CAN parse the canonical URL of the page.
Not sure if we SHOULD, though.
There was a problem hiding this comment.
we should not bother to have a canonical in 404 pages
It doesn't matter in the slightest for Google, all content, including headers, are dropped when a 404 status code is seen.
So no matter what you'd put in there, google wouldn't process and use it.
There was a problem hiding this comment.
As I said:
It's not a 404 page, so we have a matched route...
My question was if we should have a canonical URL on a 500 (or any other non-404) page.
| $app->get('/', [PageController::class], 'home'); | ||
|
|
||
| $app->get('/page[/{action}]', [PageController::class], 'page'); | ||
| $routes = $container->get('config')['routes'] ?? []; |
| sprintf('%s::%s', $moduleName, $templateName) | ||
| ); | ||
| } | ||
| } |
|
It is deployed on light.dotkernel.net https://light.dotkernel.net/page/who-we-arexxx
|
Signed-off-by: MarioRadu <magda_marior@yahoo.com>
No description provided.