Score:0

How to enable a custom ContentEntityTypes display mode?

pf flag

On Drupal 9 - commerce I have made a custom ContentEntityType, lets call it bundle_item.

It's all handled when I import product from an ERP system, and attached to a product entity as an entity reference, and all that is good.

But when i try to render the EntityReferenceItems, i cannot, since i dont have access to the entity from admin/structure/display-modes/view/add

Is it possible to enable the custom entity ('bundle_item') display mode ?

My Entity is this.

/**
 * @ContentEntityType(
 *   id = "bundle_item",
 *   label = @Translation("Bundle Item"),
 *   base_table = "bundle_item",
 *   entity_keys = {
 *     "id" = "id",
 *     "label" = "item",
 *   },
 *   admin_permission = "Administer products"
 * )
 */
class ProductBundleItem extends ContentEntityBase {
...
}

I really hope someone can point me in the right direction, thank you in advance.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.