content ), '[]' ); $path = substr( dirname(__FILE__), 0, strpos( dirname(__FILE__), $list->section. '/') ); if ( file_exists( $path . 'uploads/' . $list->id . '/' . $item->media[0]->source ) ) { $media = ''; } else { $media = '"media": [ { "type": "image", "source": "default.jpg", "credit": "", "caption": "" } ],'; } $mount = '{ "type": "card", "item": "' . $item->id . '", "mode": "open", "label": "' . $item->label . '", "title": "' . $item->title . ' properties->custom[0]->content . '\'>' . $item->properties->custom[0]->content . ' flag", "lead": "", "tagline": "' . $item->tagline . '", ' . $media . ' "content": [ { "type": "paragraph", "content": "' . $item->lead . '" }, { "type": "paragraph", "class": "author", "content": "Por ' . $item->author . '" }, ' . $contentJSON . ', { "type": "stats", "mode": "bars", "item": "' . $item->id . '" } ] }'; // print_r( $mount ); die(); return render( json_decode( $mount ) ); } include '../../template.php';