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 . '", "content": [ { "type": "section", "kicker": "Mais informações", "slug": "detalhes", "content": [ ' . $services . '] } ] }'; // print_r( json_decode( $mount ) ); die(); return render( json_decode( $mount ) ); } include '../../template.php';