Closed gbinal closed 8 years ago
@cacraig - I see that you've got a PR in for it, but couldn't tell how it operated. Is there a file to edit that changes the dropdown?
@gbinal The PR uses Jekyll's templating system to reorder the agency names during the rendering process, rather than editing a static file. So it should automatically handle all new added agencies going forward.
Yep! No need to worry about it in the future, @gbinal
Sorry for being dense, but I'm still struggling to grok it. I guess I'm wondering where the order is determined or rather, if there was a desire to reorder it, where one could.
@gbinal -
{% assign agencies = site.agencies | sort:"name" %}
This sets the variable agencies, which is sorted on the attribute "name".
If you wanted to change it to sort descending, you would do something like:
{% assign agencies = site.agencies | sort:"name" | reverse %}
@gbinal In other words, there's no way in this implementation to tweak the ordering to make exceptions. It's fully alphabetical.
If you want to be able to tweak the order, then we can maintain the list manually, but that means always maintaining the list manually.
Roger. I'm cool with that. The only change I'd have made is putting USAID after the Departments, but it's not worth more effort at this point.
Thanks for resolving folks and sorry you had to walk me through it a bit.
It seems that the dropdown is ordered alphabetically by page filename (here). We should change this so that it's in this order: