# How to use variables/bbcode in a post?

**URL:** https://meta.discourse.org/t/how-to-use-variables-bbcode-in-a-post/194226
**Category:** Development
**Created:** [June 17, 2021, 7:01pm UTC](https://meta.discourse.org/t/how-to-use-variables-bbcode-in-a-post/194226 "2021-06-17T19:01:56Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![j.jaffeux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j.jaffeux/32/60297_2.png) [@j.jaffeux](https://meta.discourse.org/u/j.jaffeux)
#### Post date: [June 21, 2021, 1:01pm UTC](https://meta.discourse.org/t/how-to-use-variables-bbcode-in-a-post/194226/3 "2021-06-21T13:01:20Z")

</div>

An alternative is also to write a theme component (less heavy than a plugin) and use wrap:

> [@Generic bbcode wrapper for theme components](https://meta.discourse.org/t/generic-bbcode-wrapper-for-theme-components/123516):
>
> I added this feature a while back and realised I didn’t post about it. You can now use a special syntax in markdown to have it cooked and usable in theme components without having to write a plugin. // wrapped in div.d-wrap [wrap=baz foo=bar]Content[/wrap] // wrapped in div.d-wrap [wrap=baz foo=bar] Content [/wrap] // wrapped in div.d-wrap [wrap=baz foo=bar] [/wrap] // this one will be rendered as a span.d-wrap instead of a div.d-wrap a [wrap=baz]Content[/wrap] b The name of the component w…

---

_[View the full topic](https://meta.discourse.org/t/how-to-use-variables-bbcode-in-a-post/194226)._
