Omit user profile pages in link picker

Hi there!

Is there an option to exclude user profile pages from appearing in the ‘suggest’ drop-down when adding a page via the Insert link macro? I can’t think of many cases where we would want to link to a profile when there is the ‘user mention’ option.

Reading the documentation for the Suggest Widget, it seems that UserPicker and PagePicker distinguish between the two but I wasn’t sure if a similar approach could be taken and/or where to specify this.

Thanks! :slightly_smiling_face:

There’s no configuration option for this currently. You’d have to overwrite https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-ckeditor/xwiki-platform-ckeditor-plugins/src/main/webjar/xwiki-resource/entityResourceSuggester.js#L86 to filter out documents that have an object of type XWiki.XWikiUsers. See also https://extensions.xwiki.org/xwiki/bin/view/Extension/Solr+Search+Application .

Hope this helps,
Marius

1 Like