# Unable to call specific page from site controller

**URL:** <https://forum.getkirby.com/t/unable-to-call-specific-page-from-site-controller/25626>\
**Category:** Questions\
**Tags:** v3\
**Created:** [May 31, 2022, 4:46pm UTC](https://forum.getkirby.com/t/unable-to-call-specific-page-from-site-controller/25626 "2022-05-31T16:46:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilby](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dilby/32/3221_2.png) [@dilby](https://forum.getkirby.com/u/dilby)\
**Post date:** [May 31, 2022, 4:46pm UTC](https://forum.getkirby.com/t/unable-to-call-specific-page-from-site-controller/25626/1 "2022-05-31T16:46:41Z")

</div>

Hi all - I have a controller for my projects page which allows me to filter projects by location. Projects controller below:

```auto
<?php
return function($page) {

    $locationFilter = param('location');
    $sectorFilter = param('sector');

    $projects = $page('projects')->children()->listed();
    $location = $projects->pluck('location', ',', true);
    $sector = $projects->pluck('sector', ',', true);

    // filter conditionally
    $projects = $projects
        ->when($locationFilter, fn($locationFilter) => $this->filterBy('location', $locationFilter, ','))
        ->when($sectorFilter, fn($sectorFilter) => $this->filterBy('sector', $sectorFilter, ','));

    return [
        'locationFilter' => $locationFilter,
        'sectorFilter' => $sectorFilter,
        'projects' => $projects->paginate(99),
        'location' => $location,
        'sector' => $sector,
    ];

};

```

I decided I’d like to extend this feature beyond just the projects page and include a list of all the locations in the footer page for improved seo.

So I changed the projects to be the standard site controller, but if I change

`$projects = $page->children()->listed();`

to

` $projects = $page('projects')->children()->listed();`

I get the following error:

**Object of type Kirby\Cms\Page is not callable**

How can I call the children of a specific page in this scenario?

Thanks so much

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [May 31, 2022, 4:49pm UTC](https://forum.getkirby.com/t/unable-to-call-specific-page-from-site-controller/25626/2 "2022-05-31T16:49:06Z")

</div>

> [@dilby](#):
>
> ` $projects = $page('projects')->children()->listed();`

Should be `page('projects')`, i.e. without the `$` in front, you cannot use the variable `$page` as a function.

---

<div class="post-metadata">

**Author:** ![dilby](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/dilby/32/3221_2.png) [@dilby](https://forum.getkirby.com/u/dilby)\
**Post date:** [May 31, 2022, 4:51pm UTC](https://forum.getkirby.com/t/unable-to-call-specific-page-from-site-controller/25626/3 "2022-05-31T16:51:55Z")

</div>

Oh gosh thanks so much @texnixe - a nice and simple one for you!
