Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Summary #2252

Merged
merged 10 commits into from
Sep 27, 2024
Merged

Object Summary #2252

merged 10 commits into from
Sep 27, 2024

Conversation

tina-cloud-app[bot]
Copy link
Contributor

@tina-cloud-app tina-cloud-app bot commented Sep 26, 2024

Ben's suggested that the object field type page should include details of the usage and a practical example.

I've quickly put together a description of the usage and created a PBI for adding an example, #2253.

--- Isaac

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tina-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 26, 2024 11:33pm

@isaaclombardssw isaaclombardssw changed the title object summary (PR from TinaCMS) Object Summary Sep 26, 2024
@isaaclombardssw isaaclombardssw marked this pull request as ready for review September 26, 2024 06:58
@isaaclombardssw isaaclombardssw requested a review from a team as a code owner September 26, 2024 06:58
Copy link
Contributor

@joshbermanssw joshbermanssw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small qol changes, like the idea :)

content/blocksPages/astro.json Show resolved Hide resolved
next: content/docs/reference/types/rich-text.mdx
previous: content/docs/reference/types/reference.mdx
---

## `object` Type

The `object` field is a dynamic field type creates a nested page in the CMS with the data it contains.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"a dynamic field type that creates a nested page in the CMS with the data it contains"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

next: content/docs/reference/types/rich-text.mdx
previous: content/docs/reference/types/reference.mdx
---

## `object` Type

The `object` field is a dynamic field type creates a nested page in the CMS with the data it contains.

This can be used to create repeated data structures, group related data in the CMS and/or give users the option to choose between a set of templates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are repeated data structures?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like a list of some object (ex. I want a bunch of author objects, with name, books etc.) – author being the data structure

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm


![](https://res.cloudinary.com/forestry-demo/image/upload/v1727331115/tina-io/docs/Sep-26-2024_16-03-00_f3ogev.gif)

* With `list` set to `true`, and using `templates` as opposed to `fields` the user can select between associated templates – this appears as above, but pressing the `+` gives you the option to choose between templates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use templates and fields alongside one another?

Copy link
Contributor

@isaaclombardssw isaaclombardssw Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah 80% sure it's only one or the other

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ apoc it is not possible

@isaaclombardssw isaaclombardssw merged commit b498473 into main Sep 27, 2024
4 checks passed
@isaaclombardssw isaaclombardssw deleted the tina/object-summary branch September 27, 2024 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants