Hello,
I am working on a project using Xperience by Kentico 30.0.1 and need to create a custom data type for content types. My requirement is:
The custom data type should allow content editors to input either:
- A URL (external or internal), or
- A page selected from the page tree (using the page selector).
The two fields (URL and page selector) should not be separate but combined into one data type. The editor should only interact with one input at a time, based on their selection (e.g., a input field choose between "URL" or "Page Selector").
This data type should be reusable across content types.
In Sitecore, there is a Link field that provides similar functionality, where users can choose between an external link, an internal page, or even a media link. I am looking for a way to implement something equivalent in Xperience by Kentico.
I understand that URLs and page selectors are fundamentally different in Kentico, so I want guidance on:
- The best approach to creating such a custom data type.
- Any examples or resources for creating custom form components in Xperience.
- How to handle the storage of these two different types of inputs in a single field in the database.
Any help or direction would be greatly appreciated!
Thank you!