Ways to get displayed child pages on parent page as well as on child page of this parent in sidebar?Attempting to paste code from wordpress codex page and from the 3 other sites, but without results.I usually get rather than listing of child pages, listing of parent pages!? what's the problem?Simply to mention, maybe is essential, all parent pages have its very own page-template.

example code:

    <?php
    if($post->post_parent)
    $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0"); else
    $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
   if ($children) { ?>
<ul>
<?php echo $children; ?>
</ul>
<?php } ?>