Skip to content

Instantly share code, notes, and snippets.

@Zoramite
Created February 9, 2011 02:57
Show Gist options
  • Save Zoramite/817799 to your computer and use it in GitHub Desktop.
Save Zoramite/817799 to your computer and use it in GitHub Desktop.
Testing the urlPath variable when doing a cfindex with a custom type.
<cfscript>
index action="purge" collection="test";
testQuery = queryNew('key,body,title,something');
for(i = 1; i < 15; i++) {
queryAddRow(testQuery);
querySetCell(testQuery, 'key', i);
querySetCell(testQuery, 'body', 'Testing: ' & i);
querySetCell(testQuery, 'title', 'Testing ' & i);
querySetCell(testQuery, 'something', '/my/url/' & i);
}
index action="update" collection="test" type="custom" query="testQuery" key="key" body="body" title="title" urlPath="something";
search collection="test" criteria="*" name="results";
writeDump(results);
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment