User login

Agaric

Keeping Drupal's contextual links working even when the whole content item is linked offsite or triggering a lightbox

We have a site where one content type (publicity, for news items and awards) are listed, but the whole thing is wrapped in an anchor tag and linked to outside content. To prevent leaving the site before the contextual edit link is shown, i did this:

Give custom blocks template suggestions by type and views blocks by view ID

<?php
/**
 * Implements hook_theme_suggestions_HOOK_alter() for blocks.
 */
function kidneys_theme_suggestions_block_alter(array &$suggestions, array $variables) {

How to get the base path for your Drupal 8 site in a Twig template

In page.html.twig you will have a working {{ base_path }} variable. Why it isn't available in every template, i have no idea. As i think it should be and everything else looks messy, my preferred solution is to do exactly as Drupal does in the preprocess page function for any place i need it.

Drupal 8 default content the Agaric way

For the moment, we're following the crowd and using the Default content module. It is nice and has built-in integration with installation profiles, but the export could be more convenient (multiple items of content at once, please!) and import could be made much more robust (given half a chance, we'll reimplement it on migrate).

What to do when developing a Drupal 8 module and a class file just isn't being autoloaded even though it is definitely there

Short answer: Restart apache or disable the APC classloader in your local.settings.php (see settings.php).

While working on the Give module, which follows the same pattern for donation forms as Drupal 8 core's Contact module uses for contact forms, an access control handler was not being found even though i quadruple checked that my handler annotation described the handler correctly for the name and location of its file.

The ConfigEntityType annotation for the access handler, with most other annotations removed:

Multistakeholder and Platform Cooperatives resources

A core concept of Platform Cooperatives [ http://platformcoop.net/ ] isn't new— the idea that a cooperative enterprise maybe should not be entirely owned and controlled by only workers or only consumers. This kind of cooperative has been called hybrid, solidarity, or multi-stakeholder:

http://www.co-oplaw.org/2014/09/multi-stakeholder-cooperatives/

Drupal in a virtual machine cheat sheet

This cheatsheet presumes you're already set up with VirtualBox and Vagrant, configured for Drupal. (Agaric has our own base box to have a head start on setting up for this purpose, but some of the magic is in the Vagrantfile stored with our projects.)

In a terminal, go to the directory holding your Vagrantfile and your project code. Then the fun begins.

vagrant up

to start the virtual machine.

Adding an application available to Debian Wheezy to Mint (LMDE)

I very much like having an autocomplete application launcher (one button to launch the launcher, and type a letter or three to select the program you want, and enter to launch it), and Synapse is the best i've used.

With no other recommendations forthcoming from Mint Debian Edition's official package list, and with Synapse clearly stable for Debian, the need seemed clear: add Debian's packages to LMDE in a way that wouldn't cause unintended updates to Debian, rather than LMDE-released, versions of packages which they share.

Add a replacement pattern token for a Views field rewrite results

Views fields offer the opportunity to "Rewrite results: Rewrite the output of this field". The option further specifies "Enable to override the output of this field with custom text or replacement tokens." It then provides a textarea with the instruction: "The text to display for this field. You may include HTML. You may enter data from this view as per the 'Replacement patterns' below." The replacement patterns, in turn, have the introduction: "The following tokens are available for this field.

Day-to-day usage of Gnucash for a Worker Cooperative

To view an account with all its subaccounts, go to the main Accounts tab, right click on the account you want to view, and select "Open SubAccounts".

For example, to see the checking account including each member's budget, go to Assets:Current Assets:DCU Checking and Edit > Open SubAccounts (or right/option click as mentioned).

Syndicate content