stats4sd / Stats4SD-Resources-Site

Reposistory for the Stats4SD Resources Repository
https://resources.stats4sd.org
GNU General Public License v3.0
0 stars 0 forks source link

Support subcategorisation of resources #137

Open chrismclarke opened 7 years ago

chrismclarke commented 7 years ago

As requested by Roger, particularly useful for likes of e-siac collection which would naturally be split into different topics.

dave-mills commented 6 years ago

Mmm. I think this can work by allowing collections to have parents and children. E.g:

"collections": {
  "key1": {
    "title": "eSIAC";
    "slug": "e-siac"
    "children": {
      "key2": true,
      "key3": true,
      ... 
     }
  },
  "key2": {
    "title": "Topic 1 - Introduction"
     "parents": {
      "key1": true
    }
  }
  "key3": {
    "title": "Topic 2- Tailored Products"
     "parents": {
      "key1": true
    }
  }

+ves - flexibility; a collection can be part of many "parent" collections, data structure is robust against future requirements (like including individual topics as seperate resources, which we might need to do soon with eSMS and DataTree)

-ves - some things will probably only ever make sense as sub-categories, so will need more ways of filtering to ensure only parents get shown on the front page, and that children can be sorted correctly etc etc.