Code

Used to pull in formatting and styles to display code blocks.

Drupal8 attaching libraries to specific pages

Submitted by AppCreator on Sat, 11/07/2015 - 15:56

Drupal 8 is just days away from stable release and I have finally had a chance to play.
It's a full rewrite so lots of changes, the admin interface seems much cleaner.
This is a short note on attaching libraries in a custom theme.
JavaScript and Stylesheets get attached via libraries which are defined in the {theme-name}.libraries.yml file.
which could look something like:

global-styling:
version: VERSION
css:
base:
css/theme/blocks.css: {}
code-highlight:
version: 1.x
css:

Embed an entity within another in Drupal 7

Submitted by AppCreator on Sat, 06/29/2013 - 14:16
This is some notes of techniques used in a recent project to save time if done again. The idea was to display multiple related entities within the main entity, node in this case, and to embed the forms for those entities as well. To keep it neat we will wrap all but the latest entity in a collapsed fieldset. First of you need to create the entities, I used Entity Construction Kit.