$id = 'Rs8CtpTS3c';
function mountCard( $item ) {
$site = '';
$notes = '';
$service = $item->properties->custom->service;
if ( isset( $service->site ) && $service->site ) {
foreach ( $service->site as $one_site ) {
$site .= '{
"type": "paragraph",
"content": "touch_apphref . '\' target=\'_blank\'>' . $one_site->show . '"
},';
}
}
if ( isset( $service->notes ) && $service->notes ) {
$notes = '{
"type": "paragraph",
"content": "warning' . $service->notes . '"
},';
}
$services = $site . $notes;
$services = $services !== '' ? rtrim( $services, ',' ) : '';
$mount = '{
"type": "card",
"slug": "' . $item->slug . '",
"item": "' . $item->id . '",
"mode": "open",
"label": "' . $item->label . '",
"title": "' . $item->title . '",
"tagline": "' . $item->tagline . '",
"lead": "' . $item->lead . '",
"badge": {
"type": "medal",
"color": "' . $item->badge->color . '"
},
"content": [
{
"type": "section",
"kicker": "Mais informações",
"slug": "detalhes",
"content": [ ' . $services . ']
}
]
}';
// print_r( $mount );
// die();
return render( json_decode( $mount ) );
}
include '../../template.php';