Asset sorting screen
The Asset sorting screen allows you to define the default sort order and direction of the assets list. You can also define a list of sorting options shown to the user.
An asset type must be selected to list on the Details screen for the fields described in the sections below to appear. |
Sort-by options
This section allows you to define the fields that are available in the sort-by list. You can add, remove, or edit the fields in the default list and configure attribute, metadata, and keyword values for the sort-by list. This list can then appear to the user on the asset listing page, allowing them to sort the asset listing in various ways.
Sorting by standard asset field value
This section allows you to add, remove, or edit the standard asset fields in the sort-by list. By default, several options are added, as shown in the figure below.
To add a new field to the list:
-
In the New section:
-
Select the type of field to add in the asset field (for example, asset ID).
-
Enter a display name to use in the sort-by list.
-
-
Select Save.
The asset field will appear in the current list:
The Display name field allows you to change what displays in the sort-by list.
To remove an option from the list:
-
Select Remove.
-
Select Save.
To add additional fields in the list, use the fields available in the New section.
Sorting by asset attribute value
This section allows you to add, remove, or edit the attribute fields in the sort-by list. An attribute field is a field on an asset that is not part of the standard list, such as the alt or caption field for an image. By default, no attribute fields are added to the list.
To add a new asset attribute field:
-
In the New section, select the asset type from the list.
What you select on the Details screen of the asset listing page determines the list of available asset types.
-
Enter the Display name for the field, which will appear in the sort-by list.
-
Select Save
The asset type will appear in the current list, as shown in the figure below.
-
In the Attribute name field, select the attribute field to use.
-
Select Save.
You can change what is shown in the sort-by list using the Display name field.
To remove an option from the list:
-
Select Remove.
-
Select Save.
To add additional fields in the list, use the fields available in the New section.
Sorting by metadata field value
This section allows you to add, remove, or edit the metadata fields in the sort-by list. By default, no metadata fields are added to the list.
-
Enter the display name that will appear in the sort-by list.
-
Select Save.
The field will appear in the current list, as shown in the figure below.
The metadata field lets you select what metadata field to use. The display name field allows you to change what shows in the sort-by list.
To remove an option from the list:
-
Select Remove.
-
Select Save.
To add additional fields in the list, use the fields available in the New section.
Sorting by asset keyword value
This section allows you to sort the assets listed by a specific keyword value.
For example, if you are listing file assets and want to sort by size, you would enter the keyword value asset_file_size_in_bytes
.
By default, no keyword values are added to the list:
To add a new Sort-by option:
-
Enter the keyword replacement you want to sort by in the Keyword field.
-
Enter the display name that will appear in the sort-by list.
-
Select Save.
These values are not keyword replacements. Do not enclose these values between percentage (%) signs. |
The field will appear in the current list, as shown in the figure below.
The Keyword and Display name fields let you change what keyword values to use and what displays within each field.
To remove an option from the list:
-
Select Remove.
-
Select Save.
To add additional fields in the list, use the fields available in the New section.
Extra sort-by options
This section allows you to control which additional options will appear in the sort-by list.
By default, Random sorting and No sorting are selected while Asset tree sorting is not. Therefore random and no sorting appear in the list.
To remove the random order option, clear the Enable 'Random Order' option.
To remove the no sorting option, clear the Enable 'No Sorting' option.
To add the asset tree option, clear the Enable 'Asset tree' option.
Sorting selection interface
This section allows you to format the 'Sort-by' list that may appear on the Asset Listing page.
The fields that are available in this section are:
- Sort-by options order
-
This field allows you to re-order the sort-by list. Click on the arrows to arrange the options and save the page.
- Ascending sort text
-
The default value is ascending. This field allows you to set the sort direction to ascending.
- Descending sort text
-
The default value is descending. This field allows you to set the sort direction to descending.
Default sorting
This section allows you to select a default sort option for the listed assets.
The fields that are available in this section are as follows:
- Default sort-by option
-
This field allows you to set the default sort-by option for the list’s assets. By default, no sort-by option is selected. Select a value and select Save to sort the listed assets. The list of available options reflects what you configure in the sorting selection interface section.
- Default metadata sort type
-
If you are sorting by a metadata field, select which value to sort-by.
You can select either:-
Raw value, which is the value entered on the Metadata screen or
-
Presentation value, which is the value that appears in the HTML source code of the page.
-
- Default sort direction
-
This field allows you to set the default sort-by direction. You can select either Ascending or Descending.
Sorting the list of assets
By default, no sort-by option is selected for the Asset listing page.
Assets listed will appear in their order in the asset tree (if the Direct links only option is selected) or the order they are returned from the database.
To change the sort order of the assets:
-
Right-click on the Asset listing page in the asset tree.
-
Select Asset sorting.
-
Select a sort-by option from the list in the Default sort-by option field.
-
Select Save to sort the list by the selected value.
If you want to sort by a field that is not available in the list, you can use the fields in the Sort-by options section to add it to the list.
Once added, you will be able to select it in the Default sort-by option field.
Showing the sorting list on the asset listing page
Once you have set up the sort-by list on the Asset sorting screen, you can show it on the Asset listing page.
This function will allow the users to select a different sort-by option for the list of assets. For example, you have an Asset Listing of products and choose to sort them by Make. Users will see the list sorted by Make when they first visit the page. You can then allow them to change the sort option to model number or description.
To show the sort-by option on the Asset listing page:
-
Add the keyword replacements Sort-by and Submit button to the page contents bodycopy.
-
[Optional] Add the keyword replacement Sort order to allow the user to switch the order between Ascending and Descending.
Example: Setting up and showing the sorting list
Learn how to set up and add the sort-by list to an asset listing based on these scenario conditions:
-
An asset listing called "Manuals" is set up under a site.
-
It is showing all PDF files under the documents folder.
-
The default file sorting is by title.
-
The user can change the sort-by option to the asset’s published date, the description of the file, or the package code.
To recreate the above scenario:
-
Right-click on the Manuals asset in the asset tree and select Asset sorting.
-
In the Sorting by standard asset field value section, click Remove for the following:
-
Name
-
Short Name
-
Created Date
-
Last Updated Date
-
Asset Type
-
-
Select Save to remove these options from the list.
The Last updated date should still appear in the current list:
-
In the New section under Sorting by asset attribute value:
-
Select PDF file for the asset type.
-
Enter a title into the Display name field.
-
-
Select Save.
The Title field will appear in the current list:
-
In the Attribute Name field, select Title.
-
Select Save.
-
In the New section under Sorting by metadata field value:
-
Select the Description field in Metadata field.
-
Enter a description into the Display name field.
-
-
Select Save.
The field will appear in the Current list, as shown in the figure below.
-
In the New section under Sorting by metadata field value:
-
Select the Package field in Metadata field.
-
Enter Package into the Display name field.
-
Select Save to display the field in the "Current" list.
-
-
In the Extra sort-by options section:
-
Clear Enable 'Random Order' option
-
Clear Enable 'No Sorting' option
-
Select Save to remove these two sort options from the list.
-
-
In the Default sort-by option field:
-
Select Title.
-
Select Save to sort the list by the PDF file’s title.
-
-
Right-click on the page contents bodycopy in the asset tree.
-
Select Edit contents.
-
At the top of the page, add the keyword replacements Sort-by and Submit button.
-
Select Save.
When you preview the Manuals page, the list of assets now sorts by the PDF title. The Sort-by list will also appear at the top of the page.
The user can change the list sorting.