0

I created a custom entity with the drupal 8 console. Everything works well. However, when I am logged in as an administrator, my entity appears in an admin page instead of a normal page like for nodes.

In this case, the title and the edit links (tabs) are displayed in the gray bar of the administration.

How to make my entity appear as a node without the gray bar of aministration?

Thanks for your help.

1 Answer 1

1

Then you have probably defined an admin path to view the entity:

/src/Entity/MyEntity.php

 *   links = {
 *     "canonical" = "/admin/structure/my_entity/{my_entity}",

Change this to a non admin path:

 *   links = {
 *     "canonical" = "/my_entity/{my_entity}",

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.