Join GitHub today
Hey Bruno, Drew,
This solution has some common points with #39. The only significant difference I can see is that you are using Layout local service to get the count, while I chose to use remote to ensure VIEW permission filtering.
Since LayoutsTreeUtil is called from the view (through the GetLayoutsAction) and from some JSPs for layouts, and the "layouts" list is also retrieved by a remote call, I would go ahead with that approach.
I will check it further on Monday.