This module provides tokens to generate customized URLs for the current page, including options to include or exclude specific query parameters. It allows for the creation of canonical URLs that precisely control which query parameters are present.
Adds some current-page:url token variations that are geared for customized canonical urls that contain query parameters.
Features
Spurred into being by #1198032: Add modifiers to the [current-page:url] token to include the pager and the query string, this module provides the tokens:
[current-page:url-with-query]
The URL of the current page with query string included, if it exists.
[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.
[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.