1

So I'm calling a block within a HTML container in Drupal 7.x with a shortcode. There is an option for a Dynamic Shortcode as well but alas there is no documentation in the code base.

[block admin_url = "admin/structure/block/manage/block/244" hello="World" ][/block]

This pulls the Block to the page and I can see output from PHP within its content.

However! I was wondering from within the block if there is any way to access the attribute "hello" Or if this is impossible?


Basically I'm trying to create a single block which can take a parameter for a tag name that calls a View and displays the top 3 blogs from that tag. It's all so easy, until you try to do it in Drupal 7.x.

The only other solution I can think of is to create a Block for all 20 tags which then call the same view to retrieve the 3 blog posts.

danronmoon
  • 3,814
  • 5
  • 34
  • 56
Pocketninja
  • 395
  • 1
  • 12
  • 1
    Are you focused on using the shortcode module or are you open to creating a custom block to accomplish this? – fmitchell Apr 06 '19 at 20:19
  • Yo, Nice you're the first to not just correct my grammar! Well I'm open to creating a custom block as long as it can be dynamic. Otherwise I'll have to create a static custom block for each page. – Pocketninja Apr 08 '19 at 22:53

0 Answers0