Hi again....
I added this to my page.php
function NewsFeedSCH($arguments,$content = null,$parser = null) {
// [NewsFeed id="Testimonials" num=2][/NewsFeed]
if (!$arguments['id']) {
return;
}
$data = DataObject::get($arguments['id'], "", "", "", $arguments['num']); //Get Pages with ID Type
$template = new SSViewer('NewsFeed');
return $template->process(new ArrayData($data));
}
and the NewsFeed.ss file:
<% control getSomething %>
<div class="item">
<div class="quote">“</div>
<div class="blurb">$Content</div>
<div class="title">$Title</div>
</div>
<% end_control %>
How do I register the $data variable so that I can loop through it in my template file since it is being called on the fly
The news shortcode should look something like this: [NewsFeed id="Testimonials" num=2]
I already have my shorcode parser in my _config.php file. I know that works.
Thanks Again!