See my custom entity as a normal page in drupal 8

by Pascal Pivaty   Last Updated January 09, 2018 11:07 AM

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.

Tags : entities


Answers 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}",
4k4
4k4
January 09, 2018 10:45 AM

Related Questions




How to create a custom template for entities?

Updated April 07, 2015 03:03 AM


Drupal 8 Custom Entities from a UI?

Updated July 14, 2015 15:03 PM