tina.io icon indicating copy to clipboard operation
tina.io copied to clipboard

Document how/when to use "templates" instead of "fields"

Open jamespohalloran opened this issue 2 years ago • 2 comments

Summary

We should document how/when to use "templates" instead of fields. It looks like when you use multiple templates, you need to specify the template name in the query (see here), but to my knowledge, that's not required when using fields instead of templates?

Expected results

  • This info should likely be in our schema reference documentation
  • This page include the schema its based off of (or propose a different page/area to put this)
  • Explain how to query when using one template vs multiple.

jamespohalloran avatar May 17 '22 16:05 jamespohalloran

but to my knowledge, that's not required when using fields instead of templates

Yes that's right.

I think the only 2 cents I can add about when to use this is that you might want to use it when you consider documents to be alike in a logical sense, but the shape of the documents differs. Eg. a post collection with videoPost and longForm post templates.

(Though you could just as easily nest the fields in an object instead)


Side note: the real reason is because Forestry projects have this shape, might be worth revisiting deprecating this behavior once we land on a solid migration story for those projects.

jeffsee55 avatar Jun 01 '22 23:06 jeffsee55

Back to OnDeck in favor of isTitle docs first

gitsstewart avatar Jun 15 '22 15:06 gitsstewart

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 13 '22 18:09 stale[bot]