cfdocs icon indicating copy to clipboard operation
cfdocs copied to clipboard

Relate in model itself

Open shaedrich opened this issue 7 years ago • 7 comments

Why not add "related" as "tags", "categories" or "collection" to the model itself instead of making specific views like this and relate everything manually: https://github.com/foundeo/cfdocs/blob/master/data/en/array-functions.json

Perhaps you chose this way so you do not have to loop over every model to collect every tag page and every model related to it. And you would not have any central control over the tag pages.

shaedrich avatar Aug 24 '17 11:08 shaedrich

Yeah just thought it would be easier to manage that way, also lets you create a new category without editing a bunch of files (since there are so many json files it can be hard to find all the files you want).

What I don't want to do is have it defined in two places, that will be hard to manage.

pfreitag avatar Aug 25 '17 18:08 pfreitag

Agreed that it should only be in one place. Speaking of which, I notice also that there are files cf[version].json that list new tags and functions for each version, but this is redundant with minimum_version in engine.

KamasamaK avatar Aug 26 '17 18:08 KamasamaK

@KamasamaK Using minimum_version from model json and tags from separate views seems inconsistent to me... oO

shaedrich avatar Aug 26 '17 23:08 shaedrich

@KamasamaK those cf[version].json files get generated automatically from the minimum_version data... I run /utilities/indexer.cfm and it updates those files along with some other index files used by the front end.

pfreitag avatar Sep 06 '17 17:09 pfreitag

These files should be moved to separate directories imho...

shaedrich avatar Sep 06 '17 19:09 shaedrich

@pfreitag Thanks for that information. Sorry, I didn't even check the code. I did not know that there were auto-generated files. In that case, I amend my previous statement to be "[data] should only be defined in one place". I think persisting as an indexed value is fine as long as the indexes are properly maintained.

KamasamaK avatar Sep 06 '17 19:09 KamasamaK

@pfreitag Why not add listing key to data so the indexer can auto-generate files like CF11 for collections like Array Functions?

shaedrich avatar Sep 07 '17 07:09 shaedrich