Metadata Target Types
Metadata is Data which describes or adds information to other data. For this to work, Entities which are Metadata store the ID of the Target. In addition, they must know what Target Type this ID describes, because an ID like 20503 could be in use in many systems.
The Target Type is a simple number and all known Target-Types are stored in the SQL-Database. Any Target-Type number from 1-100 are reserved for 2sxc/EAV predefined types, any number above 100 you can define yourself for your use case.
Reserved / Built-In Target-Types
The following list are internally reserved Target-Types
- Anything with 1 (or 0) is defined as not being Metadata
- Attribute/Property Metadata - key should be number
- App Metadata - key should be number (AppId)
- Entity-Metadata - key should be guid of entity
- Content-Type Metadata - key should be string static-name
- Zone Metadata
- Scope Metadata
- Dimension (Language) Metadata
- CMS-Item (like
page:42) - key should be string
- System Metadata
- Site Metadata
- Page Metadata
- Module Metadata
- User Metadata
90Custom Metadata target - for your most common custom target that only you care about
91Custom1 - additional custom target for your own use, only your app cares about this
92Custom2 - ...
101+ is free to define for your own purpose, but ATM you probably shouldn't use them
Custom Target Types
You can easily add custom types as you need them in the SQL database yourself. Just make sure your type-id is greater than 100.
- Introduced in 2sxc v2
- The 100 top numbers reserved for 2sxc in 2sxc v5