Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get current content type

$node = Drupal::routeMatch()->getParameter('node');
$typeName = $node->bundle();
$typeLabel = $node->getTitle();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #current #content #type
ADD COMMENT
Topic
Name
4+4 =