properties->custom->service; if ( isset( $service->address ) && $service->address ) { $address = '{ "type": "paragraph", "content": "placeaddress->href . '\' target=\'_blank\'>' . $service->address->show . '" },'; } if ( isset( $service->telephone ) && $service->telephone ) { $telephone = '{ "type": "paragraph", "content": "phonetelephone->href . '\' target=\'_blank\'>' . $service->telephone->show . '" },'; } if ( isset( $service->site ) && $service->site ) { $site = '{ "type": "paragraph", "content": "touch_appsite->href . '\' target=\'_blank\'>' . $service->site->show . '" },'; } if ( isset( $service->mail ) && $service->mail ) { $mail = '{ "type": "paragraph", "content": "mailmail->href . '\' target=\'_blank\'>' . $service->mail->show . '" },'; } if ( isset( $service->notes ) && $service->notes ) { $notes = '{ "type": "paragraph", "content": "warning' . $service->notes . '" },'; } $services = $address . $telephone . $site . $mail . $notes; $services = $services !== '' ? rtrim( $services, ',' ) : ''; $mount = '{ "type": "card", "slug": "' . substr( $placeholderImages[ $customIterator ], 0, strpos( $placeholderImages[ $customIterator ], '-recorte.png' ) ) . '", "item": "' . $item->id . '", "mode": "open", "label": "' . $item->category . '", "title": "' . $item->title . '", "tagline": "' . $item->properties->custom->service->brand . '", "content": [ { "type": "paragraph", "content": "' . $item->lead . '" }, { "type": "featured", "content": ' . json_encode( $item->properties->custom->featured ) . ' }, { "type": "section", "kicker": "Onde comprar", "slug": "onde-comprar", "content": [ ' . $services . '] } ] }'; // print_r( json_decode( $mount ) ); die(); $customIterator++; return render( json_decode( $mount ) ); } include '../../template.php';