Hi, i just installed this module and i saw there is no way to add an schema to a Block. I think this would be usefull on common custom blocks, like.......a block for the Logo, or perhaps, the telephone or an address.

The only think it should have is the type, and then the own code must have what it's required.

Plus, it will be less block template code. Till now i solved like this:

<?php
	
	$schema = NULL;
	
	if ( $block->subject == 'BLOCK_NAME' ) {
		$schema = ' itemscope itemtype="http://schema.org/GovernmentBuilding"';
	}
	
	else {
		print '<div id="' . $block_html_id . '" class="' . $classes . '"' . $attributes . $schema . '>' . $content . '</div>';
	}
	
?>

many thanks for this module! =)

Comments

FAAREIA’s picture

i just saw that an erased part of the code, breaks the code.....just ignore the "else" statement.