• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Get first post's image

grantus

Active member
#1
How can I grab an image attachment from the first post of a thread? And would it work in a custom template?

I tried using something like this:

{$xf_attachment_data.filename}

But don't know how I can get it working. Any ideas?
 

Thomas.B

Well-known member
#2
A little more info and context would be helpful. For example, in which template do you want to „grab“ the attachment? Can there be more than one attachment in the first post? If so, can there be more than one image?
 

Thomas.B

Well-known member
#4
K, so you want to access the first attachment of the first post. That should be straightforward.. Would this custom template be included in another template?