Get ParagraphSystem of a resource inside another resource
Hi,
I'm need to read a text that is on a parsys inside a text component.
I have a page that shows a list of news, this page has a resourceType list-news, for example.
each one of my news has a resource type "News".
When I am on my list-news reading each one of my content new, and I do a hit.getResourceType, I am getting the resourceType of my "list-news" item,
How can I get the parsys, of my item that has another resource type???
I can't find a similar case on the internet ![]()
I am using this:
for (Hit hit : result.getHits()) {
if(null != hit.getProperties() ) {
SlingHttpServletRequest slingReq = getRequest();
ParagraphSystem parSys = ParagraphSystem.create(hit.getResource(), slingRequest);
for (Paragraph par: parSys.paragraphs()) {
String myType = par.getType().toString() ;
}
} }

