Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

HTL Syntax Error


Level 4

Actually, I am trying to use the below syntax

<span data-sly-use.params="${'tagname.js' @value=item.productFilterTag}" class="package-uses"

But getting this error

"Cannot get DefaultSlingScript: Identifier tagname.js cannot be correctly instantiated by the Use API"


And the tagname.js code is given below

use(function () {
    // you can reference the parameters via the this keyword.
    var resourceResolver = resource.getResourceResolver();
    var tagManager = resourceResolver.adaptTo(;
    var tag = tagManager.resolve(this.value);
    var name =;
    var title = tag.title;
	var pageLocale = currentPage.getLanguage();
    var localizedTitle = tag.getTitle(pageLocale);

    return {
        title: title,


3 Replies