Use FileGenie in a File/Menu Support
Question:
How can I use FileGenie to have a list of files from a folder appear in a List/Menu field?
Answer:
To have FileGenie put the files in a List/Menu a bit of handcoding is required. Start by creating a File Genie Folder List. From Bindings, insert the item you want the display in the List/Menu. Select the item you inserted and apply the Folder List Repeater. Now insert a File Menu, name it and put in 1 static option (if you only want the files to appear) or 2 static options (if you want to show an initial value to the user). In my case I choose 2 options. Switch to code view.
Now this is where the handcoding comes in!! Select the complete Folder List Repeater Start and put this before the second <option value>. Select the complete Folder List Repeater End and put it below the second <option value>. Select the iten you placed on the page and put it inside the second <option value>, first as the value, second as the text to appear.
Your code should now look like this:
<select name="Brochures" id="Brochures">
<option value="">Make your choice...</option>
<%
' *** Folder List Repeater Start
while Brochures.CanRepeat()
%>
<option value="<%= Brochures.Files("Name") %>"><%= Brochures.Files("Name") %></option>
<%
Brochures.MoveNext
wend
' *** Folder List Repeater End
%>
</select>
That's basically it. Preview the result on a live page and see what happens!
I'd really appreciate your feedback on your results!
Comments
Be the first to write a comment
You must me logged in to write a comment.