Hi!
I'm designing a website that will have some pages containing a greater amount of subpages (up to 150 subpages per page - no way to split that up). The idea is to group the list of subpages by their first character, just like the categories in Wikipedia are displayed.
I've created a new model that will hold that subpages, having control that will output a list of all occuring first characters. So
<% control get_alphabet %>
<a href="#$char">$char</a>
<% end_control %>
in it's template will give me a heading navigation bar. Now I want the titles of all subpages to show up below their first character. The output should be like
<a name="A"/>
<h2>A</h2>
<ul>
<li><a href...>Alien</a></li>
<li><a href...>Argon</a></li>
<li><a href...>Automobile</a></li>
</ul>
<a name="B"/>
<h2>B</h2>
<ul>
<li><a href...>Butterfly</a></li>
...
But the following code won't work:
<% control get_alphabet %>
<a name="$char"/>
<h2>$char</h2>
<ul>
<% control get_children_for_char($char) %>
<li><a href...>$Title</a></li>
<% end_control %>
</ul>
<% end_control %>
I get an error in this template. If I take out the second control statement or put in a constant parameter, it won't complain. I guess, I cannot pass a variable parameter to a control block, like "get_children_for_char($char)"? How would I manage that? Are there alternatives?
Thanks and greatings!
craesh