Instagram Block: Setup

Instructions for setting up Instagram Block

Installing

Instagram Block can be installed like any other Drupal module. More information can be found here: https://drupal.org/documentation/install/modules-themes/modules-7

Configuring

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 https://drupal.org/node/1599352#comment-7040050 , 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.

Pages

Subscribe with RSS Subscribe to RSS - block