Code: Select all
<ul>
<li>#1
<ul>
<li>#1.1</li>
</ul>
</li>
<li>#2</li>
</ul>
I didn't really get if the markup produced by all the sites using s9y is a built-in freature or if it can be changed in any way ...
Best greetings,
drx
Code: Select all
<ul>
<li>#1
<ul>
<li>#1.1</li>
</ul>
</li>
<li>#2</li>
</ul>
So it is possible to access this depth level somehow?This can then be edited in the "comments.tpl" template file. I think you could be able to use that sequential order to build the nested order again using smarty markup, but that's certainly some work to do.
Code: Select all
$Level = 0;
foreach(array_keys($Entries) as $Key)
{
if($Level != $Entries[$Key]['Level'])
{
if($Level>$Entries[$Key]['Level'])
{
while($Level > $Entries[$Key]['Level'])
{
echo "</li>\n</ul>\n";
$Level--;
echo "</li>\n";
}
}
else
{
while($Level < $Entries[$Key]['Level'])
{
echo "<ul>\n";
$Level++;
}
}
}
else
{
echo "</li>\n";
}
// actual comment goes here
}
while($Level > 0)
{
echo "</li>\n</ul>\n";
$Level--;
}Recursion wouldn't be needed, if i understand correctly what you said about the flat array.The bottom line is, I wouldn't recommend it, just because of the sake of nested items. The nesting can properly be indicated with CSS, and with much more control than the other way, so I don't see a pressing reason why to take on that building. Recursion is certainly slower in this case than just indexed sequences...
Code: Select all
{$comment.depth}