Hello everyone,
Until now I haven't had any problems with the great processwire cms, but this is something quite strange ( or the case is that I'm doing something terribly wrong...)
On basic-page.php i run the following code:
foreach($page->children as $child){
echo '<li class="A">';
foreach($child->children as $book){
echo '<li class="B">';
echo '</li>';
}
echo '</li>';
}
with this as my expectations:
<li class="A">
<li class="B"></li>
<li class="B"></li>
</li>
<li class="A">
<li class="B"></li>
<li class="B"></li>
</li>
however, the following was returned:
<li class="A"></li>
<li class="B"></li>
<li class="B"></li>
<li class="A"></li>
<li class="B"></li>
<li class="B"></li>
what is going here... any help is much appreciated