In my current project I many times need the parent content. But there is no standard function for this.
So a function to get parent content would be nice in Content Lib
var result = contentLib.getParent({
key: '/path/to/mycontent'
});
In my current project I many times need the parent content. But there is no standard function for this.
So a function to get parent content would be nice in Content Lib
var result = contentLib.getParent({
key: '/path/to/mycontent'
});
Hi,
This sounds like something the lib-util could handle. All these types of simplifying functionality is not best suitable for core, but would fit perfect in lib-util, that is built for this purpose.
A pull request for lib-util would be nice @rbrastad
I made some code a year ago which was never merged https://github.com/enonic/lib-util/compare/content.getAncestors#diff-946c6bbb2308deb87f33b74dfb79287fR83
I guess I forgot all about it and did not make a pull request.