Reading meta tag values of an asset
Hi,
I am trying to read all meta tag values added to an asset.I used the following code snippet to read
1.Reading tags by the following method
asset.getMetadatavalue("cq:tags")
2. Having an array of shorthand tag ids added.
3. Used the for loop to iterate over tag ids and used "resolve" method to get the tag object.
tagManager = resolver.adaptTo(TagManager.class);
Tag custTag = tagManager.resolve(t1);
4. When trying to read its values,it is breaking out from the second tag onward. Getting proper values for the first tag and null values for the second one
custTag.getName();custTag.getPath();
5. Length of a tag array is coming properly.
Could you please help me on this
Regards,
Kirithi