hello,
i'm a frontend designer with small programming knowledge and have the following question:
<aside>
..
..
<% if getFeaturedCount %>
<div class="block">
<div class="header">
<h2>Project Featured</h2>
</div>
<div class="content">
<div class="list">
<% control getProjectFeatured %>
<div class="item">
<ul>
<li><a href="$Link">$title</a></li>
<li>$shorttitle</li>
<li>$year</li>
</ul>
</div>
<% end_control %>
</div>
</div>
</div>
<% end_if %>
<% if getLabCount %>
<div class="block">
<div class="header">
<h2>Labs</h2>
</div>
<div class="content">
<div class="list">
<% control getLabList %>
<div class="item">
<ul>
<li><a href="$Link">$name</a></li>
<li>$subtitle</li>
<li>$Logo</li>
</ul>
</div>
<% end_control %>
</div>
</div>
</div>
<% end_if %>
..
..
</aside>
i have structures like above (typical sidebar blocks) and as you can see i have to print the output of different models (datatypes) in the always same html structure
<div class="block">
<div class="header">
TITLE
</div>
<div class="content">
ITEMS
</div>
</div>
in smarty for example i would include another template for each block and give parameters with it (TITLE, ITEMS) and
would end with the following:
<aside>
...
...
{include myblock.html
title="Project Featured",
items=$getProjectFeatured()}
{include myblock.html
title="Labs",
items=$getLabList()}
...
...
</aside>
how to do this in silverstripe?
thanks and best regards sb