I'm trying to return all possible folders with 'blog-content' in the ID, is there a method for this or a different way of doing this? So far I can only get one result if it is the exact match. Like so:
const ContentSearchModel = require('dw/content/ContentSearchModel'); const apiContentSearchModel = new ContentSearchModel(); apiContentSearchModel.setFolderID('blog-content'); apiContentSearchModel.search(); const folderSearchResult = apiContentSearchModel.getFolderID();
I can't see any method for returning an array of folders matching the query:
So i think this may be possible a different way - by content searching all articles with say 'article' in the id and then using the getMatchingFolders method in the contentSearchRefinements class to output the collection of folders. Although now i don't really understand how to run the returned articles through the refinement class. any help would be appreciated?