Hi,
I'm working on sightly based component development. where i want to set the data attributes with short URL
I tried using JS which works only anchor tags but not for data attributes.
var resourceType = resource.getResourceType();
resolved = resolved + ".html";
}
Any alternate for data attributes?
Solved! Go to Solution.
you can use data-sly-attribute
https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md#223-attribute
Hi,
What do you mean by short URLs? is it Vanity URLs?
Can you please explain more what output you expecting using sightly?
Thanks
Arun
Views
Replies
Total Likes
you can use data-sly-attribute
https://github.com/Adobe-Marketing-Cloud/htl-spec/blob/master/SPECIFICATION.md#223-attribute
Thanks, will try this
Views
Replies
Total Likes
Hi
I tried data-attributes in anchor tag as below
href="${resolve.resolvedLink}"
data-sly-attribute.data-values="${resolve.resolvedLink}"
in href : i could short url as /home.html
where as in data-values : /content/.../en/home.html
I need to update anything in configuration ??
Views
Replies
Total Likes
Views
Likes
Replies