- ๐จ๐ฟCzech Republic parisek
Thank you, working for me, but CI test still not happy. Maybe best we can is separate problematic token to another issue?
- last update
almost 2 years ago Patch Failed to Apply - last update
almost 2 years ago Patch Failed to Apply - ๐ท๐บRussia sashken2
I'm use patch #21 from https://www.drupal.org/project/token/issues/1614456 โจ [current-page:query:?] should fall back to empty string Needs work
And it works good for me. - ๐บ๐ธUnited States generalredneck Texas, USA ๐บ๐ธ
Given that this issue is 5 years older than my oldest child and it can watch PG-13 without supervision, I created a module that handles the scenario and a few like it.
I present Token Url Plus โ .
This module (as the time of this writing) provides the tokens:
[current-page:url-with-query]
The URL of the current page with query string included, if it exists. This is the functionality we were looking for here.
[current-page:url-with-query:without-some-parameters:param1,param2,โฆ]
The URL of the current page with query string included but filtered by removing the provided query parameters. e.g. 'without-some-parameters:utm_campaign,utm_medium,utm_source' would be replaced with the current url, with the three utm parameters filtered out if they existed.
This is advanced usage for what you are looking for here
[current-page:url-with-query:with-some-parameters:param1,param2,โฆ]
The URL of the current page with query string included but filtered to only include the provided query parameters. e.g. 'with-some-parameters:page,category_id' would return a url containing only query parameters, '?page=1&category_id=2' if they existed.
You can use this one with metatags on views to support JUST the query parameters that the view provides.
This will allow Token the module to remain unchanged and take the burden off of the decision for backward compatibility as expressed in #11.
- ๐ฌ๐งUnited Kingdom karengrey
Thank you generalredneck, this is exactly what I needed!
- ๐ฎ๐ณIndia sorabh.v6 Indore
sorabh.v6 โ made their first commit to this issueโs fork.
- Merge request !91Issue #1198032: Updated code in hook_token_info and hook_tokens and updated the test as well. โ (Open) created by sorabh.v6
- ๐ฎ๐ณIndia sorabh.v6 Indore
Pushed the code from #58 to MR and tested on local. It worked and even passed all the tests.