2

New to P&T Assets, just got it today, v2. Using a flat out blank template and the two examples from the site docs. Scanned two directories of images that work in the normal file manager. It appears the assets:files tag displays nothing. assets:folders Folders display. EE2.5.5.

{exp:assets:folders folder="top" recursive="yes"}
    <h3>{folder_name}</h3>
    <ul>
        {exp:assets:files folder="{folder_id}"}
            <li><a href="{url}" target="_blank">{if title != ""}{title}{if:else}{filename}{/if}</a></li>
        {/exp:assets:files}
    </ul>
{/exp:assets:folders}

Shows:

Image

Screenshots

Should it show the list of files?

2 Answers 2

2

Have you indexed your upload directories according to the Assets docs?

Assets won’t actually show any files until you’ve indexed your upload directories. You can do that from Add-Ons → Modules → Update Indexes. The initial indexing might take some time, depending on how many files you have. However future indexes should go much quicker, since Assets will only have to index what’s changed.

You can also re-index an individual folder by clicking the “Refresh” button at the top-right of Assets’ file manager, or from its fieldtype’s file selection modal.

4
  • 2
    I believe their example has a typo. {exp:assets:files folder="{folder_id}"} Should actually be... {exp:assets:files folder_id="{folder_id}"}
    – Blair
    Jan 18, 2013 at 4:52
  • Does changing that parameter name get things working?
    – Anna_MediaGirl
    Jan 18, 2013 at 5:48
  • Yep it does. Shot them a tweet, fixed on their site.
    – Blair
    Jan 18, 2013 at 6:00
  • Tada! Can you add this as your answer and accept it as correct by clicking on the check mark to the left of the answer.
    – Anna_MediaGirl
    Jan 18, 2013 at 6:02
0

Changing folder="{folder_id}" to folder_id="{folder_id}" got things working correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.