Active
Project:
Schema.org
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
22 Mar 2012 at 03:03 UTC
Updated:
22 Mar 2012 at 03:05 UTC
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
Comment #1
FAAREIA commentedi just saw that an erased part of the code, breaks the code.....just ignore the "else" statement.