Skip to content

armgit / Vvveb

Public Imported from GitHub
0

Powerful and easy to use cms to build websites, blogs or ecommerce stores.

1011 B
Raw Blame
@post  = [data-v-component-post]
@image = [data-v-component-post] [data-v-post-images] [data-v-post-image]

//editor info
@post|data-v-id = $post['post_id']

@post|before = <?php

if (isset($post_idx)) $post_idx++; else $post_idx = 0;
$post = $this->_component['post'][$post_idx] ?? [];
?>

//manual echo to avoid html escape
@post [data-v-post-content] = <?php if (isset($post['content'])) echo($post['content']);?>
//@post [data-v-post-content] = $post['content']



//catch all data attributes
@post [data-v-post-*]|innerText = $post['@@__data-v-post-(*)__@@']
@post img[data-v-post-*]|src = $post['@@__data-v-post-(*)__@@']
@post a[data-v-post-*]|href   = $post['@@__data-v-post-(*)__@@']	
@post [data-v-post-url]|title = $post['name']	


//images
@image|deleteAllButFirstChild
@image|before = <?php
if(isset($post['images']) && is_array($post['images']))
foreach ($post['images'] as $image) { ?>

	@image [data-v-image-src]|src = <?php 
		echo '/image/' . $image['image'];
	?>

	@image|after = <?php 
}
?>