Topic: Get children pages does not work

Hi hope someone can help me with the problem.
This code:

<?php $pages = Page::children('page'); ?>
<?php foreach($pages as $page) { ?>
    <a href="<?php echo Site::url().'about/'.$page['slug']; ?>"><?php echo $page['title']; ?></a>
<?php } ?>

from here http://monstra.org/documentation/theme-template-tags
says that i can get the list of children of the page (Get children pages for a specific parent page)

So i put this code in my template for my page Details, since i have like 7 childrens for details page, but it does not work it show nothing at the place i added that code, and there is no error even on DEV mode

(с) Roman Art
So far So good wink

Re: Get children pages does not work

nvm has to be this code =/
works well

                        <?php $pages = Page::children('details'); ?>
                        <?php foreach($pages as $page) { ?>
                            <a href="<?php echo Site::url().'/details/'.$page['slug']; ?>" class="list-group-item"><?php echo $page['title']; ?></a>
                        <?php } ?>
(с) Roman Art
So far So good wink

Re: Get children pages does not work

RomanArt

Thanks to Your code I solved one of my problems that I am facing right now. Thank You.

1. I have a question though... how to display instead of title of child pages just the content? let me tell You what I am planning to do.
I want to create something like (categories / subcategories ->> where I want to display all my child pages by their content (and the content will be just image)
I want to make simple gallery - but none of plugins I know of have already gallery with categories and subcategories, that's why I am trying every workaround solutions.

2. Is there anything I can do, to display in the sidebar a tree of page and subpages? (categories and subcategories)