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

In Drupal 8 blocks became plugins. Custom blocks also became content entities with types similar to node types. Now users can add fields on custom blocks and create different custom block types with different field setup.

What do you need to do ?

  • Create the plugin
  • Override the defaults defined in BlockBase class
  • Define your annotation

Loading an Entityform into a Block

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

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