Reputation: 11
I have an accordion component and I would like to insert an 'parsys' component in each 'tab' of the accordion.
I realized that the 'path' attribute must be different , then I tried to set that dynamically like:
for (Value val : values) {
i++;
pathname = PATH + i;
obj = new JSONObject(val.getString());
%>
'<cq:include path='<%= pathname %>'
...
But it didn't work
I also tried to output this from JSP , but it didn't work either.
Someone know how can I solve it?
Upvotes: 1
Views: 2674
Reputation: 279
You have three options to set the path dynamically
${currentNode.identifier}
: this will give you the unique id for every node in aem.${resource.parent.name}-${resource.name}
this will give you a unique Human READABLE Id.Upvotes: 5
Reputation: 21
If you can share the piece of code where you are creating the tabs and putting parsys inside it, it would be easier to advice.
But in absence of code,here you go - While you are looping the list of tabs to be created, you can use the loop index and append it to the path, to create unique paths..
Upvotes: 1