# Display specific subpage also as directory page

**URL:** <https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400>\
**Category:** Questions\
**Tags:** v2\
**Created:** [May 4, 2017, 3:01pm UTC](https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400 "2017-05-04T15:01:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![agloeckner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/agloeckner/32/1573_2.png) [@agloeckner](https://forum.getkirby.com/u/agloeckner)\
**Post date:** [May 4, 2017, 3:01pm UTC](https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400/1 "2017-05-04T15:01:01Z")

</div>

Hi! I have a couple of user pages and I want to display one of the user pages (which is a example page) on the directory above. I can do this with an iframe, but I hope there is a better way. Maybe this can be done with routing but I don’t have experiences with that.

[website.com/profile/user0](http://website.com/profile/user0) (example user)  
[website.com/profile/user1](http://website.com/profile/user1)  
[website.com/profile/user2](http://website.com/profile/user2)

[website.com/profile/](http://website.com/profile/) → shows content of “[website.com/profile/user0](http://website.com/profile/user0)” but the URL is still “[website.com/profile/](http://website.com/profile/)”

Thanks!  
Alex

---

<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 4, 2017, 3:11pm UTC](https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400/2 "2017-05-04T15:11:51Z")

</div>

Yes, a route would be the way to go.

```auto
c::set('routes', array(
  array(
    'pattern' => 'profile',
    'action' => function () {
      return site()->visit('profile/user0');
    }
  ),
  array(
    'pattern' => 'profile/user0',
    'action' => function () {
      go('profile');
    }
  )
));

```

---

<div class="post-metadata">

**Author:** ![agloeckner](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/agloeckner/32/1573_2.png) [@agloeckner](https://forum.getkirby.com/u/agloeckner)\
**Post date:** [May 4, 2017, 3:16pm UTC](https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400/3 "2017-05-04T15:16:30Z")

</div>

So great! Love Kirby!

---

<div class="post-metadata">

**Author:** ![distantnative](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/distantnative/32/11319_2.png) [@distantnative](https://forum.getkirby.com/u/distantnative)\
**Post date:** [February 6, 2025, 5:23pm UTC](https://forum.getkirby.com/t/display-specific-subpage-also-as-directory-page/7400/5 "2025-02-06T17:23:05Z")

</div>

Archived on February 6, 2025, 5:23pm UTC


