This is a custom element for Kentico Kontent that allows you to select a content item from another Kontent project.
- Deploy the code to a secure public host
- See deploying section for a really quick option
- Follow the instructions in the Kentico Kontent documentation to add the element to a content model.
- The
Hosted code URL
is where you deployed to in step 1 - Pass the necessary parameters as directed in the JSON Parameters configuration section of this readme.
- The
Netlify has made this easy. If you click the deploy button below, it will guide you through the process of deploying it to Netlify and leave you with a copy of the repository in your GitHub account as well.
You need to specify the projectid
parameter in order to make the element work. The optional filter
parameter is for filtering just subitems of your project and you can use any filtering described in our documentation (separated by &):
Content filtering documentation
Within the filter you can also specify what language of your items you want to retrieve (a default language is returned OOTB) - https://docs.kontent.ai/tutorials/develop-apps/get-content/getting-localized-content#a-ignoring-language-fallbacks
{
"projectid": "302946ce-a441-00e5-3dba-ec6ccc479168",
"filter": "system.type=article"
}
The value is saved as a string representing a JSON object. When deserialized, it will look like:
[
{
"codename": "article_1",
"name": "Article 1",
"language": "en-US",
"type": "article"
},
{
"codename": "url1",
"name": "url1",
"language": "en-US",
"type":"video_item__url_"
}
]