Hot answers tagged

2

I was just wondering if there is a more OO way to define the caching of the custom entity detail pages. This would be extending the route provider you are using now (DefaultHtmlRouteProvider or AdminHtmlRouteProvider), specifying it in the custom entity class * "route_provider" = { * "html" = "Drupal\mymodule\...


2

Adding the cache context to the response is not more global. It's quite the opposite. Only if you put the cache context in the same render element which depends on this context it can be merged into all caching levels affected. In this example the context of the paragraph will be merged with the parent node and then with the page. The paragraph and node ...


1

Yes, you can force the request to have always query parameters by redirecting in an event subscriber. The problem is, how do you know what currency the user is requesting if the parameter is missing? So what you probably want is to process outbound paths to have already the correct parameters. BTW your question is a bit confusing. The first part is talking ...


Only top voted, non community-wiki answers of a minimum length are eligible