XF 1.5 Get current post id

Parsnip

Active member
How can I find the current post id from the URL?

For example, I would like the post id from the end of the URL below.

//xenforo.com/community/threads/blah-blah.23491/#post-290494

I've tried using {$post.post_id} but that shows the id of the last post on the page.

Cheers.
 
I just found your post while searching, and the {$post.post_id} in your post does seem to give me the message ID for each message in a thread when inserted into the message template. So even though I cannot help you with what you are trying to get (not clear on where you are trying to get the anchor parameter) but you've helped me on my question to go the other direction, so thank you!)
 
Last edited:
Top Bottom