Thanks Rob and David for your help.
As a first trial, I added in init.bsh:
import java.lang.net.jalbum.Rendition;
String getSrcSetSizes(AlbumObject ao) {
String sizesSet = "";
if (ao.getVars().get("imageRenditions") != null) {
ImageRenderer renderer = ao.getRenderer();
sizesSet= renderer.getWidth().toString();
}
return sizesSet;
}
and added to index.htt inin the <ja:rowiterator><ja:coliterator> section:
<%
System.out.println("getSrcSetSizes: " + getSrcSetSizes(currentObject));
%>
But that gives next error message:
bsh.ReflectError: Method getWidth() not found in class'se.datadosen.jalbum.ImageRenderer' in index.htt at line number 506
What do I wrongly?
I get the same error message if I remove
import java.lang.net.jalbum.Rendition;
Edit:
I found the problem, it should be:
sizesSet= ao.getRenderer().getCloseupRenditions().get(0).getWidth().toString();
Edited by: AndreWolff on 21 Aug 2022, 19:11