Filter parts in content studio


#1

Enonic version: 7.1.0
OS: Ubuntu 19

Hi again, a short question, is it possible to filter which parts to show in the Content Studio’s part selector?


#2

Like some kind of filter on a per region level?
No such thing right now, but I guess it could be implemented.


#3

Yes, something like that, by the way, is it possible to set a part to hidden? As to not show up there? Thanks for the help.


#4

If you store an instance of a configured part as a fragment, it becomes a content which means that you can set access privileges and even use it in ContentSelectors. That also means that you can add such fragments to other content or to page/layout/part configurations, in addition to their regular region placement as if they were parts. However, I haven’t heard of anyone doing this to accomplish what you’re asking for - it might end up working, but also it might not. There could be some disadvantages to going for a solution like this, for instance that you need to preconfigure the parts before you store them as fragments and make them available to users, and I’m not sure what happens if a user tries to convert them back to parts again.

Note that if the whole purpose of that kind of part is to always be a fragment, it might be better to just use a content type instead, especially if there are to be multiple mutations of that part or if the stored instances are to be shown in multiple places.

If you just need one instance of the current part, another approach could be to use site.xml. For example, if you currently have a “footer” part that you only want to allow users to add to the “footer” region and not to the “main” region, you can store it as a fragment like I described above, or you can add the config fields into site.xml and get+render these from the page controller.