$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);
$block_manager = \Drupal::service('plugin.manager.block');
<?php | |
/* Script located in the docroot for your Drupal 8 site */ | |
use Drupal\Core\DrupalKernel; | |
use Drupal\Core\Site\Settings; | |
use Symfony\Component\HttpFoundation\Request; | |
$autoloader = require_once __DIR__ . '/core/vendor/autoload.php'; | |
use GuzzleHttp\Client; |
<? if ($articles->pagination()->hasPages()): ?> | |
<ul class="pagination"> | |
<? if($articles->pagination()->hasNextPage()): ?> | |
<li><a class="prev" href="<?= $articles->pagination()->nextPageURL() ?>">Older posts</a></li> | |
<? endif; ?> | |
<? foreach($articles->pagination()->range(5) as $paging): ?> | |
<li><a href="<?= $articles->pagination()->pageURL($paging); ?>"><?= $paging; ?></a></li> | |
<? endforeach ?> |
<!DOCTYPE html> | |
<html<?php print $html_attributes; ?>> | |
<head> | |
<?php print $head; ?> | |
<title><?php print $head_title; ?></title> | |
<?php print $styles; ?> | |
<?php print $head_scripts; ?> | |
</head> | |
<body<?php print $body_attributes;?>> |