No, the %RID% macro is only interpreted in Show/Add/Remove Collection calls and in the special Thumbnail command.
If you use unique filenames or have some custom ID field with unique values, you could query on that field. If you are not certain your Filename values are unique, here is a work-around. Pair a query for Filename with the Directory Path field. In both Mac and Windows OS you can't have two files of the same name in the same folder.
The code below is for use where the whole form is inside a PortWeb template - i.e. there may be more than one per page - so we name the form with the RID of the current item:
<form action="/scripts/portweb.dll?query" method="POST" name="%RID%">
<!-- catalog and template names -->
<input type="hidden" name="catalog" value="myCatalog" />
<input type="hidden" name="template" value="myTemplate" />
<!-- now the query arguments -->
<input type="hidden" name="field1" value="Filename">
<input type="hidden" name="op1" value="matches">
<input type="hidden" name="value1" value="%Filename%">
<input type="hidden" name="join2" value="and">
<input type="hidden" name="field2" value="Directory Path">
<input type="hidden" name="op2" value="matches">
<input type="hidden" name="value2" value="%Directory Path%">
<!-- the value of the next field is the button's on-screen text -->
<input type="submit" name="Submit" value="Details" />
<!-- Uncomment these if you think you'll get more than one match
<input type="hidden" name="offset" value="0">
<input type="hidden" name="ascending" value="1"> -->
</form>
If the Form is in a static page or spans a template (opens in header, closes in footer) then replace the first line above with:
<form action="/scripts/portweb.dll?query" method="POST" name="unique_value">
For Mac users the two differing opening code lines above for the form would be...
<form action=".portweb?query" method="POST" name="%RID%">
...and...
<form action=".portweb?query" method="POST" name="unique_value">
If your content includes similarly named files with a number of different records (i.e. with different catalogue significance) and you want to do unique queries now is probably a good time to re-visit your naming strategy!
Question: Can I use RID as a query parameter? [FAQ00142.htm]
Last Update:- 31 May 2006
Site and articles © Mark Anderson 2001-2007 - Visit my home page