1

Perhaps I'm simply not understanding the tag's function, but I have an upload directory ({filedir_4}) with about 10 subfolders I made within the Assets interface. I'd like to list the titles and ids of these subfolders, and I'm attempting to do so like this:

{exp:assets:folders parent_folder="{filedir_4}"} {folder_name}, {folder_id}
{/exp:assets:folders}

This returns nothing. However, if I do this:

{exp:assets:folders recursive="yes"} {folder_name}, {folder_id}
{/exp:assets:folders}

It does manage to list every folder and subfolder, which is somewhat encouraging, but I'm only looking for the contents of {filedir_4}. What am I missing here? Thanks!

Assets 2.0.5 / EE 2.5.5 / PHP 5.3.2

1
  • I keep looking through this, as it's fairly critical for my project for it to function, so I'll just document my madness here. It's also the case that the assets:files folder parameter also doesn't take. I was able to track it down to the _get_folder_id_by_tagpath function in mod.assets.php, but instead of picking that apart, I may rework my frontend to simply use folder_ids, which do work. – Trapp Mar 6 '13 at 2:54
1

I just tried it like so:

{exp:assets:folders parent_folder="{filedir_1}"} 
{folder_name}, {folder_id}<br />
{/exp:assets:folders}

In a totally blank template, and got back a list of folders and IDs for Filedir 1. Do you have anything else in your template when testing? And you're absolutely certain about the ID for that File Upload Preference?

1
  • Thanks for responding, Lisa. I had in fact made a blank "test" template where I attempted that exact thing, no dice. I also looked at file permissions, at whether or not it mattered if the file paths were absolute or relative, and reinstalled the plugin. I've since written my own query which mimics the module's _get_folder_id_by_tagpath method, and plug the result into the folder_id parameter, which works. Though I may want to use this plugin in the future, or other people may experience this, and figuring out what's going on here would be nice. – Trapp Mar 6 '13 at 14:07

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.