Skip to content

Commit

Permalink
Modificacion para ajustar los schemas (subtypes)
Browse files Browse the repository at this point in the history
  • Loading branch information
vicram10 authored Jul 28, 2020
1 parent 333d487 commit 72cce53
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions SchemaMN/SubsSchemaMN.php
Original file line number Diff line number Diff line change
Expand Up @@ -734,21 +734,24 @@ public static function PrepareDisplayContext(&$output, &$message, $counter){
$prop_values = LoadSchemaMN::getSubItempropValues($value['itemprop_id']);

//ini -> div
if ($itemprop_main != $prop_values[$value['itemprop_id']]['itemprop_main']){
Ini:
if (empty($itemprop_main)){
$schema .= '
<div itemprop="'. $prop_values[$value['itemprop_id']]['itemprop_main'] .'" itemscope itemtype="'. $prop_values[$value['itemprop_id']]['url_schema'] .'">
<p><strong>'. $prop_values[$value['itemprop_id']]['prop_label'].'</strong></p>';
$itemprop_main = $prop_values[$value['itemprop_id']]['itemprop_main'];
}
//itemprops
$schema .= '
<p><span><u>'. $prop_values[$value['itemprop_id']]['label'] .'</u>:</span> <span itemprop="'. $prop_values[$value['itemprop_id']]['itemprop'] .'">'. $value['itemprop_value'] .'</span></p>';

if ($itemprop_main != $prop_values[$value['itemprop_id']]['itemprop_main']){
//end div itemprop
if ($itemprop_main != $prop_values[$value['itemprop_id']]['itemprop_main']){
$schema .= '
</div>';//end -> div schema
$itemprop_main = '';
goto Ini;
}

//itemprops
$schema .= '
<p><span><u>'. $prop_values[$value['itemprop_id']]['label'] .'</u>:</span> <span itemprop="'. $prop_values[$value['itemprop_id']]['itemprop'] .'">'. $value['itemprop_value'] .'</span></p>';
}
if ($show_subtypes){
$schema .= '
Expand Down

0 comments on commit 72cce53

Please sign in to comment.