This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# main image #} | |
<ul{{ attributes.addClass(classes) }}> | |
{% for item in items %} | |
<li{{ item.attributes.addClass('field__item') }}> | |
{{ item.content }} | |
</li> | |
{% endfor %} | |
</ul> | |
{# thumbnails #} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$haystack = [ | |
'k1' => 'value 1', | |
'k2' => 'value 2', | |
'k3' => 'value 3', | |
'k4' => 'value 4', | |
'k5' => 'value 5', | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Name des aktiven Themes | |
\Drupal::theme()->getActiveTheme()->getName(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main { | |
max-width: 600px; | |
margin-left: auto; | |
margin-right: auto; | |
} | |
.full-width { | |
width: 100vw; | |
position: relative; | |
left: 50%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Files xmlrpc.php> | |
Order Deny,Allow | |
Deny from all | |
</Files> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuthUserFile /var/www/... ../wp-admin/.htpasswd | |
AuthName "Members Only" | |
AuthType Basic | |
<Files "wp-login.php"> | |
require valid-user | |
</Files> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function mymodule_preprocess_html(&$variables) { | |
if (array_key_exists('node_type', $variables) && $variables['node_type'] === 'category') { | |
\Drupal::service('page_cache_kill_switch')->trigger(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var copyBtn = document.querySelector('#copy'); | |
copyBtn.addEventListener('click', function (event) { | |
event.preventDefault(); | |
try { | |
document.querySelector('#code').select(); | |
document.execCommand('copy'); | |
} | |
catch (error) { | |
alert('Sorry, leider konnte nicht kopiert werden.'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function getFormatedArray($string) { | |
$result = array(); | |
if (strpos($string, ',') !== false) { | |
$substrings = explode(',', $string); | |
foreach ($substrings as $substring) { | |
if (trim($substring) != '') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_preprocess_page(array &$variables) | |
{ | |
/** @var \Drupal\Core\Page\HtmlPage $page */ | |
$page = $variables['page']['#page']; | |
$metaElements = $page->getMetaElements(); | |
foreach ($metaElements as $index => $metaElement) | |
{ |
NewerOlder