Specify sort order of link targets
This topic shows how you can change the sort order in the Target drop-down menu in the Insert link and the Insert External Link dialogs in a General Link field.
Before you change your Sitecore installation, back up the Core database and your solution.
Change the sort order in the Insert Link dialog
To change the sort order of the list in the Target dropdown field in the Link Details form:
-
In the Sitecore Desktop, select the Core database.
-
In the Content Editor, navigate to the
/sitecore/client/Business Component Library/version 1/Templates/Common/Text
folder. -
Add a field to store the sort order. The field has to be of the Single-Line Text type. Name the field, for example, SortOrder.
-
Navigate to the
/sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/Targets
folder. -
Set the value in the sort order you added in each target. Use the values 1, 2, and 3 to indicate the order.
-
Navigate to the
/sitecore/client/Applications/Dialogs/InsertLinkViaTreeDialog/PageSettings/TargetsSearchPanelConfig
item. -
Set the value of the Sorting field to
a
, followed by the name of your sort order field, for exampleaSortOrder
. -
Rebuild
sitecore_core_index
.
Change the sort order in the Insert External Link dialog
To change the sort order of the list in the Target dropdown field in the Link Details form:
-
In the file system of the server where you host Sitecore, navigate to the
sitecore\shell\Applications\Dialogs\ExternalLink
folder under the web root of the Sitecore installation. -
Open the
ExternalLink.xml
file, and locate this fragment:RequestResponseshell<Combobox ID="Target" GridPanel.Width="100%" Width="100%" Change="OnListboxChanged"> <ListItem Value="Self" Header="Active browser"/> <ListItem Value="Custom" Header="Custom"/> <ListItem Value="New" Header="New browser"/> </Combobox>
-
Arrange the
ListItem
nodes in the order you want.