# Topic ID as a variable?

**URL:** https://meta.discourse.org/t/topic-id-as-a-variable/374168
**Category:** Development
**Created:** [July 14, 2025, 6:48pm UTC](https://meta.discourse.org/t/topic-id-as-a-variable/374168 "2025-07-14T18:48:32Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![tknospdr](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tknospdr/32/529762_2.png) [@tknospdr](https://meta.discourse.org/u/tknospdr)
#### Post date: [July 14, 2025, 6:48pm UTC](https://meta.discourse.org/t/topic-id-as-a-variable/374168/1 "2025-07-14T18:48:32Z")

</div>

Is there a way to get the topic ID as a variable within a topic?

Use case, we have categories for support and bug tracking tickets. I’d like to set them up with templates like so.  
This:

```plaintext
> Do **not** remove this line: Support request #$(topicid)

```

Looks like this:

> Do **not** remove this line: Support request #246

Open to other ways to get the info. Just not sure how to do this.

---

_[View the full topic](https://meta.discourse.org/t/topic-id-as-a-variable/374168)._
