Get first post's image

grantus

Active member
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?
 
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?
 
There would be more than 1 attachment but I want to grab the first.

The template would be a custom one.
 
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?
 
Back
Top Bottom