ThePorge Posted March 22, 2012 Share Posted March 22, 2012 Watched the video on how to get the data file to pull resources. The demo only covered the instance of having these resources in the same directory. I would like to put my resources in a subdirectory. The demo said this could be done by adding the file path to the script, but when I do this it seems to change the result to "text" and I get the error "This graphic rule must return a resource type graphic". Here is my current rule: return '/Users/george/Desktop/Testing/Links/' + CreateResource(Field("Photo") , 'graphic' , 1); What do I need to do here? Quote Link to comment Share on other sites More sharing options...
step Posted March 22, 2012 Share Posted March 22, 2012 The path needs to be inside the CreateResource function. Though you should be able to use a path relative to your template file. Assuming it's located in the "Testing" folder, you could use this code: CreateResource("./Links/" + Field("Photo"), 'graphic', 1); Quote Link to comment Share on other sites More sharing options...
ThePorge Posted March 23, 2012 Author Share Posted March 23, 2012 Thank you. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.