You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(the same kind of snippet appears at least two more times further down in the same file)
This is a very cumbersome and fragile way of constructing the URL, which usully amounts to something like /en or /fi or /fi?clang=en . For other kinds of URLs, we already have defined a custom filter link_url for Twig. I think the same or similar filter should be used here, which would move the URL construction logic away from the Twig template and into the PHP backend code, which is better suited for this kind of conditional URL string manipulation.
Who are the users that would benefit from the enhancement and how?
Developers trying to keep sane
What new functionalities would the enhancement make possible?
Make the Twig template cleaner and easier to understand
Why is the enhancement important?
Refactoring early is good.
The text was updated successfully, but these errors were encountered:
Description of the enhancement
Our Skosmos 3 Twig templates contain code like this for constructing the URL to the home page:
Skosmos/src/view/base-template.twig
Line 34 in 4368496
(the same kind of snippet appears at least two more times further down in the same file)
This is a very cumbersome and fragile way of constructing the URL, which usully amounts to something like
/en
or/fi
or/fi?clang=en
. For other kinds of URLs, we already have defined a custom filterlink_url
for Twig. I think the same or similar filter should be used here, which would move the URL construction logic away from the Twig template and into the PHP backend code, which is better suited for this kind of conditional URL string manipulation.Who are the users that would benefit from the enhancement and how?
Developers trying to keep sane
What new functionalities would the enhancement make possible?
Make the Twig template cleaner and easier to understand
Why is the enhancement important?
Refactoring early is good.
The text was updated successfully, but these errors were encountered: