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

Map (more) Canto data to Neos #17

Open
kdambekalns opened this issue Oct 21, 2021 · 2 comments
Open

Map (more) Canto data to Neos #17

kdambekalns opened this issue Oct 21, 2021 · 2 comments
Assignees
Labels
new feature a new feature (improvements)

Comments

@kdambekalns
Copy link
Member

kdambekalns commented Oct 21, 2021

Canto offers tags, keywords, categories, folders and custom fields to structure assets. Those should be usable in Neos.

My take on a possibe configuration is this:

Flownative:
  Canto:
    mapping:
      # map "Custom Fields" from Canto to Neos
      customFields:
        # Foo Bar Baz                    # the name in Canto, for readbility
        'meta_multichoice_0':            # the id in anto
          asAssetCollection: false       # map to an asset collection named after the field
          valuesAsTags: false            # map field values to Neos tags; if true an asset is assigned a tag corresponding to the value, if false any asset "having the field" is in the collection
          include: []                    # only include the listed field values as tags
          exclude: []                    # exclude the listed field values as tags
      # map Canto tags to Neos Tags
      tags:
        enabled: false
        include: []                      # only include the listed tags
        exclude: []                      # exclude the listed tags
      # map Canto keywords to Neos
      keywords:
        asTags: false
        groupInCollection: 'Keywords'
        include: []                      # only include the listed keywords
        exclude: []                      # exclude the listed keywords
      # map Canto folders to Neos
      folders:
        enabled: false
        asAssetCollections: false        # map to an asset collections named after the folders
        asTags: false                    # map to tags named after the folders
        levels: 1                        # if more than 1 nested folders will be mapped to names ("Parent / Child")
        include: []                      # only include the listed folders
        exclude: []                      # exclude the listed folders

The configuration shown above is "future-proof", the options can be implemented as needed. And when Neos evolves (e.g. gets support for folders), that can be implemented without breaking the configuration or causing unneeded confusion.)

@kdambekalns
Copy link
Member Author

I just realized that Canto has no "categories" concept, "Kategorie" is just the term the German documentation uses for "keyword." 🤦‍♂️

@danielkestler
Copy link

Hi @kdambekalns,

what do you think about an inversed concept in the mapping configuration for higher flexibility:

Flownative:
  Canto:
    mapping:
      # map Canto fields to Neos tags
      tags:
        fields: ['tags']
        include: []
        exclude: ['Untagged']
      # map Canto fields to Neos asset collections
      assetCollections:
        fields: ['meta_multichoice_0.keyword', 'keywords']
        include: []
        exclude: []

... just an idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature a new feature (improvements)
Projects
None yet
Development

No branches or pull requests

2 participants