Hi. I'm totally new to SS and after consulting the tutorials and trying for some hours I'm simply stuck.
Here's the scenario:
The homepage shows several areas that can be dynamically packed with content. The boxes should be JS-tabbed, so one box can contain several teasers. My approach:
ArticleHolder - the main page
ArticleContainer - a container, resembling one box that can hold several Articles
Article - one item within a Container
An ArticleHolder can hold ArticleContainers as well as Articles (eg for showing a standalone video box / teaser)
Now I'm getting confused with the templating mechanism. Here's my Layout/ArticleHolder.ss
<div class="typography">
<% control AllChildren %>
<div class="HomePageArticle">
<h2>$Title</h2>
<div class="content">
<% if ClassName = HomePageArticleContainer %>
<ul>
<% control AllChildren %>
<li onhover="...">$Title</li>
<% end_control %>
</ul>
<% control AllChildren %>
$RenderForFrontPage
<% end_control %>
<% else_if ClassName = HomePageArticle %>
Article
<% end_if %>
</div>
</div>
<% end_control %>
</div>
See that control AllChildren within? How do I tell SS to use a specific template (Article.ss) to render the bunch of children? I would use that template to render the standalone articles, too (see else_if). If it's done within the controller (->renderWith("Article.ss")), how do I name/call the controller's method from the base template (seen above) ?
Appreciate your help very much and kind regards to Wellington, hope you guys have a great time there !
Thanks, Stefan