-
Notifications
You must be signed in to change notification settings - Fork 0
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
Removed dotkernel/dot-controller and replaced with handlers #33
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>
@@ -1,6 +1,7 @@ | |||
{% extends '@layout/default.html.twig' %} | |||
|
|||
{% block title %}{{ status }} {{ reason }}{% endblock %} | |||
{% block canonical %}{% endblock %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, useless
$app->get('/', [PageController::class], 'home'); | ||
|
||
$app->get('/page[/{action}]', [PageController::class], 'page'); | ||
$routes = $container->get('config')['routes'] ?? []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏🏻
sprintf('%s::%s', $moduleName, $templateName) | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋🏻 👏🏻
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.