# 按等级隐藏内容

**URL:** https://meta.discourse.org/t/hide-content-by-level/117196
**Category:** Support
**Created:** [2019年五月8日 18:10 UTC](https://meta.discourse.org/t/hide-content-by-level/117196 "2019-05-08T18:10:06Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![AndreSpecker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/andrespecker/32/139050_2.png) [@AndreSpecker](https://meta.discourse.org/u/AndreSpecker)
#### Post date: [2019年五月8日 18:10 UTC](https://meta.discourse.org/t/hide-content-by-level/117196/1 "2019-05-08T18:10:06Z")

</div>

Have some plugin that hides certain contents of a post for anyone who is not level X?

Like this:

text that everyone can see

[trust-level-2]Text that only level 2 and above can see[/trust-level-2]

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [2019年五月9日 05:37 UTC](https://meta.discourse.org/t/hide-content-by-level/117196/2 "2019-05-09T05:37:09Z")

</div>

Are you happy with a CSS only solution (view source can still allow you to see it) ? If so a theme component using wrap can make this happen.

```plaintext
[wrap=tl level=2]
test
[/wrap]

```

Will generate

```plaintext
<div class="d-wrap" data-wrap="tl" data-level="2">
<p>test</p>
</div>

```

A solution that hides on the server would require a very complex and expensive plugin performance wise.

---

<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: [2019年六月8日 05:37 UTC](https://meta.discourse.org/t/hide-content-by-level/117196/3 "2019-06-08T05:37:09Z")

</div>

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