Closed jduss4 closed 4 years ago
Examples
Cody:
Neihardt:
Transmississippi:
Things to keep in mind:
The URL should be customizable to have both category and subcategory if a project needs to override it from /section/[:section]
, yeah
began work on this branch: https://github.com/CDRH/orchid/tree/feature
one idea @techgique and I have been brainstorming for a name: "search preset"
I like that name best of what we've discussed so far. It's clear in terms of what we're doing programming-wise in the code. We can label or write the routes however is necessary for each particular website to communicate the purpose there rather than in the name of the functionality we're using in code.
I believe that this is essentially done! Might need a little customization later on, but things are pretty much aces as long as we knock out #89 later
Sites like Cody and Neihardt have sections which look very similar to the search results but generally have a custom URL (cody is a bad example for that). We need something in orchid that pulls the pagination / sorting partial, along with the search items results partial and creates a custom view based on a URL.
@lweakly and @karindalziel were okay with the term "section" being used, so what we might do is something like the following pseudocode:
The "section" parameter would automatically be sent as a query to the API for
f[]=subCategory|section
along with the pagination and sorting parameters and then thesection.html.erb
file would include the necessary partials. This might require a few changes to the search partials in order to make sure that the search results expand to the width of the screen when the facets sidebar is not there.A few concerns I have: we might have some trouble with urls at the root like
/essays
and/letters
in terms of getting the parameter out of there without screwing up other following URLs at the root of the application, but I think we should cross that bridge later. In order to prepare for it, I think the section action should call a method which does all the same stuff, but that way we could haveor something similar if we need really unique behavior and we can't pass a parameter through the routing system