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

Add support for content type snippets #5

Open
JanLenoch opened this issue Nov 23, 2017 · 0 comments
Open

Add support for content type snippets #5

JanLenoch opened this issue Nov 23, 2017 · 0 comments

Comments

@JanLenoch
Copy link
Contributor

Kentico Cloud now supports so called content type snippets. These are sets of content elements that can be added to content types to enrich their structure.

They allow you to add several content elements that are managed in one single place, similarly to how inheritance in object oriented programming works. You can add one snippet to a content type. Snippets cannot be added to other snippets, only to content types. The Delivery API responses contain both the elements originating from snippets alongside their own elements. The only difference in them is that elements from snippets have code names prefixed with the code name of the respective snippet. The format of code names is [code name of snippet]__[code name of element].

A shortened example of a content item:

{
    "item": {
        "system": {
            // ...
            "type": "brewer",
	// ...
        },
        "elements": {
	// ...
            "product_name": {
                "type": "text",
                "name": "Product name",
                "value": "AeroPress"
            },
	// ...
            "metadata__meta_title": {
                "type": "text",
                "name": "Meta title",
                "value": null
            },
	// ...
        }
    },
    "modular_content": {}
}

Implement support for rendering content items of content types that utilize a content snippet.

A temporary Dancing Goat project with a preview of snippets is available for everyone who wants to participate in this effort. If you're interested in either adjusting the sample content or implementing the support in the app, let @JanLenoch know and you'll be given access to that project in Kentico Cloud.

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

1 participant