# 페이지 유형을 가져오는 방법이 있을까요?

**URL:** <https://meta.discourse.org/t/a-way-to-get-page-type/166219>\
**Category:** Support\
**Created:** [10월 4, 2020, 9:28오후 UTC](https://meta.discourse.org/t/a-way-to-get-page-type/166219 "2020-10-04T21:28:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrDarkside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrdarkside/32/196020_2.png) [@MrDarkside](https://meta.discourse.org/u/MrDarkside)\
**Post date:** [10월 4, 2020, 9:28오후 UTC](https://meta.discourse.org/t/a-way-to-get-page-type/166219/1 "2020-10-04T21:28:01Z")

</div>

페이지 유형으로 해당 페이지가 게시물 페이지인지 아닌지를 확인할 수 있는 방법이 있을까요? 현재는 게시물에만 고유하게 적용되는 posts-wrapper 클래스가 있는지 확인하고 있지만, 이것이 최선의 방법은 아니라고 생각합니다.

> ```
> <script type="text/discourse-plugin" version="0.8">
> api.onPageChange(() => {
> $(document).ready(() => {
> if ($(".posts-wrapper").length) {
> //run script if it is a post
> }
> });
> });
> </script>
> 
> ```

---

<div class="post-metadata">

**Author:** ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)\
**Post date:** [10월 4, 2020, 10:10오후 UTC](https://meta.discourse.org/t/a-way-to-get-page-type/166219/2 "2020-10-04T22:10:30Z")

</div>

본문에 `archetype-regular` 클래스가 있다고 생각합니다.  
다이렉트 메시지는 `archetype-private_message`입니다.

---

<div class="post-metadata">

**Author:** ![MrDarkside](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mrdarkside/32/196020_2.png) [@MrDarkside](https://meta.discourse.org/u/MrDarkside)\
**Post date:** [10월 4, 2020, 10:37오후 UTC](https://meta.discourse.org/t/a-way-to-get-page-type/166219/3 "2020-10-04T22:37:32Z")

</div>

고마워요, 훨씬 나아 보입니다!

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [11월 3, 2020, 10:39오후 UTC](https://meta.discourse.org/t/a-way-to-get-page-type/166219/4 "2020-11-03T22:39:07Z")

</div>

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