logo

Extra Block Types (EBT) - Nieuwe Layout Builder ervaring❗

Extra Block Types (EBT) - gestileerde, aanpasbare bloktypes: Slideshows, Tabs, Cards, Accordions en vele andere. Ingebouwde instellingen voor achtergrond, DOM Box, javascript-plugins. Ervaar vandaag al de toekomst van layout building.

Demo EBT-modules Download EBT-modules

❗Extra Paragraph Types (EPT) - Nieuwe Paragraphs ervaring

Extra Paragraph Types (EPT) - analoge op paragrafen gebaseerde set modules.

Demo EPT-modules Download EPT-modules

Scroll

Drupal en jQuery. Les 8. jQuery UI en jQuery UI Tabs koppelen aan Drupal 7

10/10/2025, by Ivan

Bestandscode

/sites/all/modules/custom/custom.info

name = custom
description = custom module
core = 7.x

/sites/all/modules/custom/custom.module

<?php
 
  drupal_add_library('system', 'ui.tabs');

CSS-code:

#tabs{
  border: 0px;
}
 
.ui-tabs-nav{
  background: none;
  border: none;
}

HTML-code in node-product.tpl.php:

<div id="tabs">
      <ul>
        <li>
          <a href="#tabs-1">Beschrijving</a>
        </li>
        <li>
          <a href="#tabs-2">Kenmerken</a>
        </li>
      </ul>
 
      <div id="tabs-1">
        <?php
          print render($content['body']);
        ?>
      </div>
      <div id="tabs-2">
        <?php
          print render($content);
        ?>
      </div>
    </div>

Om te beginnen moet je een aangepaste (custom) module aanmaken.

https://rupalbook.org/content/iz-chego-sostoit-modul-drupala

Nu moet je het gewicht (weight) van de module custom hoger instellen dan dat van de kernmodules. Hiervoor ga je via phpMyAdmin naar de database en stel je het veld weight in op 100 of hoger. Je kunt het record van de module vinden in de tabel system:

System db table

Nu kun je in de module custom jQuery UI-plug-ins koppelen, bijvoorbeeld zo:

<?php
drupal_add_library('system', 'ui.tabs');
drupal_add_library('system', 'ui.accordion');

Je kunt deze code aan het begin van de module plaatsen, direct na de openings-tag van PHP.