Jump to content
Sign in to follow this  
ildarvasin

Output files from folder

Recommended Posts

I did upload files to the server and now I need to display the names of these files on my page.how to do it. thank you in advance.

1234.png

Share this post


Link to post
Share on other sites

In your template, you should be able to do

echo $page->your_file_field->name;

This is a good cheatsheet regarding the file field as well:

https://cheatsheet.processwire.com/files/file-properties/

 

I apologize, I kinda missed that you were not going through a file field but were uploading to a directory. This might be a bit better approach for you then:

 

  • Like 1

Share this post


Link to post
Share on other sites
21 hours ago, louisstephens said:

In your template, you should be able to do


echo $page->your_file_field->name;

This is a good cheatsheet regarding the file field as well:

https://cheatsheet.processwire.com/files/file-properties/

 

I apologize, I kinda missed that you were not going through a file field but were uploading to a directory. This might be a bit better approach for you then:

 

thank you so much.you really helped

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...