-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Additional exhibit configuration ideas (that should be fairly easy to extend) #3
Comments
Those add-on sort/filter features should be useful in some cases. |
I was not certain in the little time I spent in the code how to add these options to the existing "islandora_exhibits_browse_fields_data" -- it does seem that these options should be available for each exhibit that is created, so it would need to be represented as two individual values to these islandora_exhibits_browse_fields_data fields, right? I stopped because I didn't see a clear way to pull the fields for a given exhibit without the "hack" approach which would need to inspect the current URI to get the exhibit path -- and then loop through all the fields to find the one that has ['path'] = the current exhibit path to then get that field settings' related Solr sort field and Solr filter. (to me it seems like a bit of a hack way to get the right field settings) If you feel that my understanding of that drupal variable is correct, I can proceed, but I really don't want to change anything that causes any issues down the road. Thoughts? |
it does seem that these options should be available for each exhibit that is created, so it would need to be represented as two individual values to these islandora_exhibits_browse_fields_data fields, right? <<< Correct ! You can add those 2 options as same as I've done for headline, description, start_date (in islandora_exhibits_browse.admin.inc) .... for each exhibit that is created.
The loop is you're talking about is here:
$list_fields is an array variable I use to pull out those fields:
If you use dpm($list_fields), you will see: So we will need to create 2 more options in the configuration exhibit page named as: sort_field and filter_field We will need to update this function:
Adding the $list_fields when calling this function, something like this: function islandora_exhibits_browse_build_results($solr, $pid, $list_fields) { And then $fl_params and $sort_params will be made based on this $list_fields << This is what I was planning to do with $fl_params ^_^ and then this line will need to be updated as well:
It should be like this: $result_fields = islandora_exhibits_browse_build_results($solr, $pid, $list_fields); Simon. |
I believe that each block's configure could really use a couple more settings.
Please let me know if you would prefer that I forked your repo and made these changes as a pull-request.
The text was updated successfully, but these errors were encountered: