# Get current page type (Litium 6)

**URL:** <https://forum.litium.com/t/get-current-page-type-litium-6/1014>\
**Category:** Questions\
**Created:** [August 7, 2019, 3:18pm UTC](https://forum.litium.com/t/get-current-page-type-litium-6/1014 "2019-08-07T15:18:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![magnus.bolling](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/magnus.bolling/32/222_2.png) [@magnus.bolling](https://forum.litium.com/u/magnus.bolling)\
**Post date:** [August 7, 2019, 3:18pm UTC](https://forum.litium.com/t/get-current-page-type-litium-6/1014/1 "2019-08-07T15:18:16Z")

</div>

Hi,

How can i get the current page type? I need to check if I’m on a category page or not (Category template).

Litium version: 6

---

<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:** [August 8, 2019, 10:05am UTC](https://forum.litium.com/t/get-current-page-type-litium-6/1014/2 "2019-08-08T10:05:43Z")

</div>

The page type when you’re visiting a category (or a product) will be the StartPage, since they’re not actual pages in the CMS.

Depending on where you need to check you could inject PageRequestData, cast its Data property as ProductPageData and inspect that to make your evaluation.

Category, BaseProduct and Variant is also available for model binding into an action. The latter two will be null if it’s a category.

---

<div class="post-metadata">

**Author:** ![magnus.bolling](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/magnus.bolling/32/222_2.png) [@magnus.bolling](https://forum.litium.com/u/magnus.bolling)\
**Post date:** [August 8, 2019, 10:40am UTC](https://forum.litium.com/t/get-current-page-type-litium-6/1014/3 "2019-08-08T10:40:03Z")

</div>

Yes I ended up using PageRequestData.Data. From there I could get what i needed. Thanks!

---

<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:** [September 5, 2019, 10:52am UTC](https://forum.litium.com/t/get-current-page-type-litium-6/1014/4 "2019-09-05T10:52:47Z")

</div>

Closed on September 5, 2019, 10:52am UTC

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