QuestionQ15

(Official exam topics not publicly listed on Adobe’s certification page)

A developer must remove all selectors from linkValue.

Assuming linkValue = 'path/page.woo.foo.html', which two HTL approaches would be used to accomplish this task?

Choose two
  • A ${ linkValue @ removeSelectors=['foo', 'bar']}
  • B ${ linkValue @ selectors="}
  • C ${ linkValue @ selectors}
  • D ${ linkValue @ removeSelectors='foo, bar, woo'}
Explanation

In HTL (Sightly) URI manipulation, setting the selectors option to an empty string replaces the entire existing selector string with nothing, removing every selector from the resulting URL, while the removeSelectors option can be supplied with a comma-separated list naming each selector to strip out individually; since path/page.woo.foo.html carries the selectors 'woo' and 'foo', passing removeSelectors='foo, bar, woo' strips both existing selectors (the non-matching 'bar' is simply ignored), yielding the same selector-free result as the empty selectors assignment.

Community Discussion

No comments yet. Be the first to start the discussion!