 |
Use the number attribute of a User Defined Field in queries to examine the output and fine tune your queries for best results.
T A G C O D E:
<dpUserField name="film genre" number="all"> will return something like the following:
romance, comedy, cult
This can be useful information when exploring suggested link matches. For example, if you want a list of up to five suggested links of other films with similar film genres as the story you are reading, use the following:
Suggested Links for <dpHeadline>:<br>
<dpQuery issue="archives" userField="film genre" sort="fuzzy" max="5">
<dpHeadline link="on"><br>
</dpQuery>
which would output something like this:
Suggested Links for Planet of the Vampires:
The Body Snatcher
The Changeling
The Exorcist
Halloween
House of Wax
That works perfectly, but provides little output to confirm how the match happened while debugging your templates. Here's a modification using
<dpUserField number="all"> to provide better output while testing:
Suggested Links for <dpHeadline> (<dpUserField name="film genre" number="all">)<br>
<dpQuery issue="archives" userField="film genre" sort="fuzzy" max="5">
<dpHeadline link="on"> (<dpUserField name="film genre" number="all">)<br>
</dpQuery>
which would output something like this:
Suggested Links for Planet of the Vampires (Classic, Horror)
The Body Snatcher (Classic, Horror)
The Changeling (Horror)
The Exorcist (Horror)
Halloween (Horror)
House of Wax (Horror)
See also:
<dpHeadline>,
<dpQuery>,
A D D I T I O N A L < D P U S E R F I E L D > E X A M P L E S:
S E E A L S O:
Other tag examples that incorporate <dpUserField>
|
 |