Dug in a little after I saw your question and it appears that the Predefined Rules
are handled as a special case;
Within Sitecore.Shell.Applications.Rules.RulesEditor.RulesEditorPage
and in the GetGroupedElements
method there is an OrderBy
involving a static ID RulesEditorPage.PredefinedRulesItemId
. After trying to follow the decompiled logic, my assumption is that the Predefined Rules
are weighted at the top and then the order by falls back to Element Folder
name. If that is the case, prefixing your Element Folder
name with an underscore or adding your rules to the Predefined Rules
Element Folder
would likely get them visible toward the top (though neither one of those seems like a perfect solution).
Further note: if you are interested in digging in more, there are 3 processors that get executed out of box during the RulesEditorPage
(in Sitecore 9.0.1 at least):
<getRenderedRuleElements>
<processor type="Sitecore.Pipelines.Rules.Taxonomy.GetContextFolder, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.Rules.Taxonomy.GetTags, Sitecore.Kernel"/>
<processor type="Sitecore.Pipelines.Rules.Taxonomy.GetElementFolders, Sitecore.Kernel"/>
</getRenderedRuleElements>
These pipelines effectively find and aggregate the rules for a given Tags Definition
under the Rules Context Folder
(the multi-list that is sortable and relates your rules to let's say the Insert Options
rule). The result of this getRenderedRuleElements
pipeline is what gets passed into the RulesEditorPage
and eventually ordered and rendered when you click Edit Rule
. I will update my answer if I find anything else while I continue to dig.
Hope this helps.