# Page publish state

**URL:** <https://community.hubspot.com/t/page-publish-state/52015>\
**Category:** CMS Development\
**Tags:** local-development\
**Created:** [February 23, 2022, 2:34pm UTC](https://community.hubspot.com/t/page-publish-state/52015 "2022-02-23T14:34:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanntn](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sanntn/32/99782_2.png) [@sanntn](https://community.hubspot.com/u/sanntn)\
**Post date:** [February 23, 2022, 2:34pm UTC](https://community.hubspot.com/t/page-publish-state/52015/1 "2022-02-23T14:34:45Z")

</div>

Hi,  
I’m wondering if there’s a HubL filter for page publish state? Similar to the API filter state\_\_in=PUBLISHED. So someething like {% if content.state.published = true %}  
Thanks in advance.

---

<div class="post-metadata">

**Author:** ![stefen](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stefen/32/29274_2.png) [@stefen](https://community.hubspot.com/u/stefen)\
**Post date:** [February 24, 2022, 2:01pm UTC](https://community.hubspot.com/t/page-publish-state/52015/2 "2022-02-24T14:01:14Z")

</div>

@sanntn you could probably just use the HubL variable {{ content.publish\_date }} in an if statement. It will return a time object if it’s published but if it’s not should return false(y). E.g.:

```lia-code-sample
{% if content.publish_date %}
I'm published
{% else %}
I'm a draft
{% endif %}

```
