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

Is there support? #12

Closed
jackkemmish opened this issue Jul 12, 2022 · 2 comments
Closed

Is there support? #12

jackkemmish opened this issue Jul 12, 2022 · 2 comments

Comments

@jackkemmish
Copy link

Hi there,

I am trying to add this to a project of mine and pull in tags from a document on my blog page.

I have followed the instructions and referenced my tags document but no tags are pulling through.

Is there any default tag document example you can provide?

Thanks,
Jack

@pcbowers
Copy link
Owner

The primary example under the Use section depicts a snippet illustrating pulling tags from related. Based on your use case, it looks like you need to be pulling from reference:

// assumes the tag document has a name of `categories` and the actual field holding the tags is called `myTags`

{
  name: 'myTags',
  title: 'Tags',
  type: 'tags',
  options: {
    includeFromReference: 'categories'
    ...
  }
}

An important note: when including from reference, it must contain a structure with a label and value. If the referenced document does not have fields with the name label and value, it will not work. You will need to use the customLabel and customValue options. Also note that this package is primarily made to support related rather than references. If you use a reference, creation of new tags is not currently supported.

Most of this should be laid out in the documentation! Let me know if there was something that was missing that made something unclear.

@jackkemmish
Copy link
Author

Thanks for the response

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

No branches or pull requests

2 participants