From 6edf6e8365e8b727b223a8e971267dc04cb01d54 Mon Sep 17 00:00:00 2001 From: joetsoi Date: Fri, 31 Jan 2014 00:05:26 +0000 Subject: [PATCH] [#790] idatasetform tutorial cleanups --- doc/extensions/adding-custom-fields.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/extensions/adding-custom-fields.rst b/doc/extensions/adding-custom-fields.rst index 350c68e8002..f29a3392a16 100644 --- a/doc/extensions/adding-custom-fields.rst +++ b/doc/extensions/adding-custom-fields.rst @@ -290,8 +290,8 @@ the resource schema and save them the its extras field. The templates will automatically check this field and display them in the resource_read page. -Sorting datasets by custom fields ---------------------------------- +Sorting by custom fields on the dataset search page +--------------------------------------------------- Now that we've added our custom field, we can customize the CKAN web front end search page to sort datasets by our custom field. Add a new file called @@ -301,12 +301,12 @@ search page to sort datasets by our custom field. Add a new file called :language: jinja :emphasize-lines: 16-17 -This overrides search ordering drop down box code block, the code is the same -as the default package search block but we are adding two additional lines that -define the display name of that search ordering (e.g. Custom Field Ascending) -and the SOLR sort ordering (e.g. custom_text asc). If you reload your development -server you should be able to see these two additional sorting options on the -dataset search page. +This overrides the search ordering drop down code block, the code is the +same as the default package search block but we are adding two additional lines +that define the display name of that search ordering (e.g. Custom Field +Ascending) and the SOLR sort ordering (e.g. custom_text asc). If you reload your +development server you should be able to see these two additional sorting options +on the dataset search page. The SOLR sort ordering can define arbitrary functions for custom sorting, but this is beyond the scope of this tutorial for further details see