AndyB
Well-known member
I'm creating an add-on which will display a row of links. My PHP file runs a query and returns an array called $post_id which contain post numbers.
What I would like to know is how to pass the $post_id array to my template so that each post number in the $post_id will be displayed.
My PHP:
The andy_showdeleted template:
What I would like to know is how to pass the $post_id array to my template so that each post number in the $post_id will be displayed.
My PHP:
PHP:
$viewParams = $post_id; // this does not work
return $this->responseView('Andy_ShowDeleted_ViewPublic_ShowDeleted', 'andy_showdeleted', $viewParams);
The andy_showdeleted template:
Code:
<xen:foreach loop="$post_id" value="$post_id">
{$post_id}
</xen:foreach>
Last edited: