# For one page, render as another page

**URL:** <https://forum.litium.com/t/for-one-page-render-as-another-page/1332>\
**Category:** Questions\
**Tags:** litium-6\
**Created:** [February 14, 2020, 7:55am UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332 "2020-02-14T07:55:33Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ullmark](https://avatars.discourse-cdn.com/v4/letter/u/a9adbd/32.png) [@ullmark](https://forum.litium.com/u/ullmark)\
**Post date:** [February 14, 2020, 7:55am UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332/1 "2020-02-14T07:55:33Z")

</div>

I have another question connected to my previous javascript routing questions.

- [Passing additional data via PageRequestData?](https://forum.litium.com/t/passing-additional-data-via-pagerequestdata/1304)
- [Is there a built in way of doing “catch all” pages?](https://forum.litium.com/t/is-there-a-built-in-way-of-doing-catch-all-pages/1170)

**I am wondering** if it is possible to get a page to render as its (grand)parent but maintain the same url. The “Catch all” solution given by @patric.forsgard worked great, but the last piece needed is one scenario where I actually have “data”-pages which URL should be used, but if they get a visit they should render as the grand parent and let javascript routing handle the page.

I’ve tried letting the child grab the parent and rendering with parentcontroller and parent data and making updates to the `PageRequestData.Current` but I assume that change is “too late” in the process since I’m not getting the correct page in `CurrentState.Current.PageID`

Another solution would be to move the data-pages and then the catch-all would pick up, but since it’s a page that have been live for years, I’d rather not move around that much pages unless its the only solution.

Hope the question makes sense… 😬

Litium version: _6.3.7_

---

<div class="post-metadata">

**Author:** ![NilsN](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/nilsn/32/302_2.png) [@NilsN](https://forum.litium.com/u/NilsN)\
**Post date:** [February 18, 2020, 1:55pm UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332/2 "2020-02-18T13:55:31Z")

</div>

Could you set the new page for the request with `CurrentState.Current.SetOnNewPage()`?

---

<div class="post-metadata">

**Author:** ![ullmark](https://avatars.discourse-cdn.com/v4/letter/u/a9adbd/32.png) [@ullmark](https://forum.litium.com/u/ullmark)\
**Post date:** [February 19, 2020, 7:10pm UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332/3 "2020-02-19T19:10:28Z")

</div>

Did not know of that method! Unfortunately nothing changed when calling it ☹

---

<div class="post-metadata">

**Author:** ![ullmark](https://avatars.discourse-cdn.com/v4/letter/u/a9adbd/32.png) [@ullmark](https://forum.litium.com/u/ullmark)\
**Post date:** [February 19, 2020, 8:06pm UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332/4 "2020-02-19T20:06:40Z")

</div>

Actually, that function did something, a part solution of which I was able to get what I need working. The last bit that didn’t change was

```
@Html.Action("Head", "Layout")

```

The “Page” injected through that function must come from some other mechanism (or maybe cached) since that didn’t change, but I could just use whatever was in “CurrentState” instead.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [March 18, 2020, 8:06pm UTC](https://forum.litium.com/t/for-one-page-render-as-another-page/1332/5 "2020-03-18T20:06:41Z")

</div>

Closed on March 18, 2020, 8:06pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
