# Conditional Rendering for Pages

**URL:** <https://community.weweb.io/t/conditional-rendering-for-pages/9742>\
**Category:** How do I?\
**Tags:** binding, design\
**Created:** [July 15, 2024, 9:17pm UTC](https://community.weweb.io/t/conditional-rendering-for-pages/9742 "2024-07-15T21:17:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![albarracim](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@albarracim](https://community.weweb.io/u/albarracim)\
**Post date:** [July 15, 2024, 9:17pm UTC](https://community.weweb.io/t/conditional-rendering-for-pages/9742/1 "2024-07-15T21:17:12Z")

</div>

Hello,

Does anyone know if there’s a way to conditionally render complete pages? Example: I don’t want some pages to load if the user’s role = user.  
I wanted to only render pages related to the user’s role.

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [July 16, 2024, 5:42pm UTC](https://community.weweb.io/t/conditional-rendering-for-pages/9742/2 "2024-07-16T17:42:22Z")

</div>

Hi @albarracim 👋

You can use [private pages](https://docs.weweb.io/pages/private-pages.html) to prevent users from accessing a page if they don’t have the proper user role.

Is that what you had in mind?

---

<div class="post-metadata">

**Author:** ![albarracim](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@albarracim](https://community.weweb.io/u/albarracim)\
**Post date:** [July 17, 2024, 1:37pm UTC](https://community.weweb.io/t/conditional-rendering-for-pages/9742/3 "2024-07-17T13:37:37Z")

</div>

More or less… I was wondering something like not loading/rendering those pages…
