Hello
I have a blog with blog entry's
some blog entry's contain widgets, one of the widgets is featuredvideo
ok now i have a page media..
this media page collects all the media items like video's/pictures/audio from the blog entry's
So first im doing this:
class Media_Controller extends Page_Controller {
function ViewAll($num=9999) {
$news = DataObject::get_one("BlogHolder");
return ($news) ? DataObject::get("BlogEntry", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}
in the template i do this:
<% if inSection(video) %>
<div class="clearfix pbot40">
<h2>Video's</h2>
<br>
<% control ViewAll %>
<% if Widgets %>
<div class="MediaVideoController">
$Widgets
</div>
<% end_if %>
<% end_control %>
</div>
<% end_if %>
A) I would like to filter on featured video.. so.. if widgets.. if featured video... echo featured video.. now i get alot of empty div's printed in the source code.
B) When you use featured video you get a div wrapper which contains your video's. So i when i have 3 video's in one article i get them along side eachother.. but (see example) i want all the video's in its own wrapper and nicely floating along side eachother. I would like to bypass the Widget template and just control the videos from the media template. But i dont know how to control widgets..
Any idea's?