Hi all,
Just wondering what's the best way to modify the default GET behavior of a social component? In this particular case, it is a custom social component, similar to the TodoMVC sample[1]. This is great in that it shows the custom PostOperations extended from AbstractSocialOperation.
However, let's say I've got 20,000 nodes created under my custom social component and on page load, I just want the ONE that was created by the logged in user, how can I change the default GET behavior of the component to query for a specific child node, instead of loading them all?
On page load I see an initial templates call to load the HBS template, there's an empty "selector" value there.... Does that do anything? Is there a way to utilize that?
[1] https://github.com/Adobe-Marketing-Cloud/aem-communities-todomvc-sample
Solved! Go to Solution.
Greg,
You will have to change this file - https://github.com/Adobe-Marketing-Cloud/aem-communities-todomvc-sample/blob/master/bundles/aem-comm...
You might have to perform a search in getAllItems method. getAllItems should use search.find API as opposed to srp#listChildren. You specify the constraints you want in the find API.
Thanks
Greg,
You will have to change this file - https://github.com/Adobe-Marketing-Cloud/aem-communities-todomvc-sample/blob/master/bundles/aem-comm...
You might have to perform a search in getAllItems method. getAllItems should use search.find API as opposed to srp#listChildren. You specify the constraints you want in the find API.
Thanks