Permalink
Browse files

show post in template

  • Loading branch information...
chemix committed Jun 13, 2014
1 parent 69555d6 commit 7e7ad1456b6a6767fb543dacf5404738e9e40c69
Showing with 38 additions and 1 deletion.
  1. +3 −0 app/presenters/ImportPresenter.php
  2. +35 −1 app/templates/Import/default.latte
@@ -104,6 +104,9 @@ public function renderDefault()
}
}
}
// send data to template
$this->template->wallPosts = $data;
}
}
@@ -3,4 +3,38 @@
*}
{block #content}
<h1>Import</h1>
{foreach $wallPosts as $post}
type: <strong>{$post->type}</strong> <br>
<small>
id: {$post->id}<br>
created_time: {$post->created_time} <br>
updated_time: {$post->updated_time} <br>
</small>
{ifset $post->name}
name: <h1>{$post->name}</h1>
{/ifset}
{ifset $post->status_type}
status_type: {$post->status_type} <br>
{/ifset}
{ifset $post->message}
message: {$post->message} <br>
{/ifset}
{ifset $post->picture}
piscture: {$post->picture} <br>
<img src="{$post->picture}" />
{/ifset}
{ifset $post->link}
link: <a href="{$post->link}">{$post->link}</a> <br>
{/ifset}
{ifset $post->caption}
caption: {$post->caption} <br>
{/ifset}
<hr>
{/foreach}

0 comments on commit 7e7ad14

Please sign in to comment.