a) ${ 'path/page.woo.foo.html' @removeSelectors[‘foo,bar’]}
b) ${ 'path/page.woo.foo.html' @removeSelectors{“foo”,”bar”,”woo”}}
c) ${ 'path/page.woo.foo.html' @selectors}
d) ${ 'path/page.woo.foo.html' @selectors=’’}
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Option C & D
${'path/page.woo.foo.html' @ removeSelectors='foo.bar'}
<!-- outputs: path/page.woo.html -->
${'path/page.woo.foo.html' @ removeSelectors=['foo', 'bar']}
<!-- outputs: path/page.woo.html -->
${'path/page.woo.foo.html' @ selectors}
<!-- outputs: path/page.html -->
${'path/page.woo.foo.html' @ selectors=''}
<!-- outputs: path/page.html -->
https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#125-uri-manipulation
Option C & D
${'path/page.woo.foo.html' @ removeSelectors='foo.bar'}
<!-- outputs: path/page.woo.html -->
${'path/page.woo.foo.html' @ removeSelectors=['foo', 'bar']}
<!-- outputs: path/page.woo.html -->
${'path/page.woo.foo.html' @ selectors}
<!-- outputs: path/page.html -->
${'path/page.woo.foo.html' @ selectors=''}
<!-- outputs: path/page.html -->
https://github.com/adobe/htl-spec/blob/master/SPECIFICATION.md#125-uri-manipulation
adding to this.
Options C & D -- If you want to remove all the selectors i.e foo, woo or any other value.
Options A & B -- They have incorrect syntax for given use-case due to how the quotes are provided around the selector values. If you have a scenario to remove specific selector from URL, A or B can be used provided the selector values are provided correctly i.e 'foo', 'woo' ...
The correct syntax to remove selectors from the URL 'path/page.woo.foo.html' would be option d) ${ 'path/page.woo.foo.html' @selectors=''} by setting the selectors to an empty string. This will remove all selectors and only retain the path and filename. Options a) and b) have incorrect syntax, while option c) retrieves the selectors rather than removing them.
Option B & D are correct:
${'path/page.woo.foo.html' @ removeSelectors='foo,bar'}
<!-- outputs: path/page.woo.html -->
${'path/page.woo.foo.html' @ removeSelectors=['foo', 'bar', 'woo']}
<!-- outputs: path/page.html -->
${'path/page.woo.foo.html' @ selectors}
<!-- not valid-->
${'path/page.woo.foo.html' @ selectors=''}
<!-- outputs: path/page.html -->
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies