Instagram Block: Setup

Instructions for setting up Instagram Block


Instagram Block can be installed like any other Drupal module. More information can be found here:


There are 2 things that need configuring, the connection to instagram and the settings for the block.

Create a custom block

Blocks in Drupal 8 are instances of the block plugin.
The Drupal block manager scans your module's classes for a class that contains the @Block Annotation (a special comment right above your class declaration)

Loading an Entityform into a Block

To load an Entityform into a block, there are three ways of accomplishing this:

There is a module for that

Allows to load a specified entity form as a block.
After enabling the module, the entityforms will have an optional checkbox to make them a block.
Entityform block

Leveraging Entity API and Views

It is possible to quite easily do this using views. I got this from , thanks @drupov

Tag-sensitive beans

If you want blocks to be shown only on pages with specific tags, this is an example implementation.

This will insert beans with the tag-field enabled into a page with similar tags.
It is assumed that both bean type and node type has field_tags.

The bean type is called tag_sensitive_block, and the code simply calls for all beans of this type and collects those that share a tag with the current node. Then it inserts $max_beans beans into the first and second sidebar, switching between them after each insert.

Block to encourage deep linking to your site (D7)

One of your most difficult jobs as a site administrator is soliciting inbound links to boost your traffic and your search engine position. Deep links, in context, are the most valuable.

Using the 'Path of Least Resistance' philosophy, provide users with link text at the bottom of every page using the following code snippet (D7) in a block.


Subscribe with RSS Subscribe to RSS - block