iacon Posted January 20, 2006 Posted January 20, 2006 I am trying to create a link to files stored in container fields. What I want is for the customer to see the record on the web and be able to click on the "link" to the stored file and have that start downloading. I have worked out what the link is, if I put it in the browser it downloads everytime. I just don't want people to have to cut and paste this into the browser. The link is stored in a calculation field in the database. I currently have this appear on the xml layout for the record. If you need more info let me know, but I think this covers it. Any help?
Martin Brändle Posted January 20, 2006 Posted January 20, 2006 Do you already have an XSLT file for display of your record? You can then modify it with: Download
iacon Posted January 26, 2006 Author Posted January 26, 2006 I'm still not sure on this. What should I be putting in "container"? And What is the Xpath? How do I work this out?
Martin Brändle Posted January 26, 2006 Posted January 26, 2006 Hmm. You did not answer my question. For custom, dynamic web publishing, you need to have an XSLT file (or use PHP as an alternative). Do you have that? Then I can explain further.
iacon Posted January 26, 2006 Author Posted January 26, 2006 Yeah, I have created the site using the Filemaker Site Assistant.
Martin Brändle Posted January 28, 2006 Posted January 28, 2006 Ok. Now in the file that should display your download file link, add the two lines I have given before at place where the link should be shown. The XPath is a path that locates the correct element in the XML tree that is returned by the web publishing engine. An example (for the fmresultset grammar) would be: /fmrs:fmresultset/fmrs:resultset/fmrs:record[1]/fmrs:field[@name = 'url_calc']/fmrs:data[1] which addresses the first repetition (fmrs:data[1]) of the field with name url_calc (fmrs:field[@name = 'url_calc']) of the first record (fmrs:record[1]) of the result set you got (fmrs:resultset) within the fmrs:fmresultset root element (fmrs:fmresultset)
iacon Posted January 31, 2006 Author Posted January 31, 2006 So i am looking at something like this: Download It's still not working, i've detailed a bit more on what I am working with below: Database Name: Results Layout Name: Tests Table Name: Tests Field Name: Report (this is where the calculation is stored linking to the container field file) Any more help you can give is much appreciated! I am new to XML and really have no idea about the language.
Martin Brändle Posted January 31, 2006 Posted January 31, 2006 Looks like you have forgotten the double-quotes around the argument of the select attribute, and used the wrong field name. It should be like this: Download If you don't succeed, please post the file in question to this thread.
Newbies UD Dave Posted January 31, 2006 Newbies Posted January 31, 2006 I tried the solution and it is only picking up the value from the first record. Is there a way to make the code work on a list of records?
Newbies UD Dave Posted January 31, 2006 Newbies Posted January 31, 2006 I figured it out for what it is worth.
Recommended Posts
This topic is 6869 days old. Please don't post here. Open a new topic instead.
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 accountSign in
Already have an account? Sign in here.
Sign In Now