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
Add canonical links to news and events #6215
Conversation
core-bundle/src/Routing/ResponseContext/HtmlHeadBag/HtmlHeadBag.php
Outdated
Show resolved
Hide resolved
core-bundle/src/Routing/ResponseContext/HtmlHeadBag/HtmlHeadBag.php
Outdated
Show resolved
Hide resolved
core-bundle/src/Routing/ResponseContext/HtmlHeadBag/HtmlHeadBag.php
Outdated
Show resolved
Hide resolved
This PR also has the potential to fix the following problem: You can currently place the news/event reader on multiple root pages and have it output the same news entry creating duplicate content. I know this is not directly possible with core modules, because you cannot override the target reader page with the news list/event list modules but you can easily do that with an extension. You could achieve the same situation with core-only when manually linking to a given news entry with the hyperlink element for example. In any case: I think it would be smart if both, the calendar and news reader archives would have a new checkbox to activate generating a default canonical link to the configured archive reader page. This would then be overridden with the configurations per entry as in this PR. So you'd have:
|
As discussed in the call, we want to add a |
I have simply duplicated the current page code in 7e11216 now. We can refactor that once we have #6547 (comment)
implemented in 0646879 |
…anonical # Conflicts: # calendar-bundle/contao/models/CalendarEventsModel.php # calendar-bundle/contao/models/CalendarModel.php # news-bundle/contao/models/NewsArchiveModel.php # news-bundle/contao/models/NewsModel.php
a763132
to
6221554
Compare
Co-authored-by: Leo Feyer <1192057+leofeyer@users.noreply.github.com> Co-authored-by: Martin Auswöger <martin@auswoeger.com>
Co-authored-by: Martin Auswöger <martin@auswoeger.com>
…anonical # Conflicts: # calendar-bundle/contao/dca/tl_calendar_events.php # calendar-bundle/contao/dca/tl_module.php # news-bundle/contao/dca/tl_module.php # news-bundle/contao/dca/tl_news.php # news-bundle/contao/languages/en/tl_news_archive.xlf
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.
Just wondering why it's news_keepCanonical
- is that not the case for any other reader module (including the adjusted ModuleEventReader
here?).
It could be, yes. But every module needs to add its own field, because it does not know if it already exists. And the labels could be different per field. |
Ah I missed |
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.
The migrations need to be removed (see #6215 (comment)).
How about we merge as is and open a new issue to remove the migrations? 🙃 should be the same, except that we won't forget them? |
Thank you @aschempp. |
Implements #5891