Rod's profileRod StaggPhotosBlogListsMore ![]() | Help |
|
March 21 Content Rating Part III-adding a customized sort expressionIn the case of the content rating site template I wanted to sort the list by rating with the highest rated items rolling to the top:
Here is the expression I used:
format-number(sum(../../../Content_Ratings/Rows/Row[@BPID=@ID]/@Rating)div (@Ratings), '###0.0;-###0.0') Notice it's similiar to the rating expression itself. pretty cool.
To do your own you can add directly to your DVWP's sort/grouping.
Go to your DVWP, select sort and group, remove any prior sort expressions, add a new custom sort expression using the handy x-path editor (hand tweak as necessary for you own needs) and whaaa laaa- Rod. Comments (3)
Rod Stagg
has turned off comments on this page.
Trackbacks (2)The trackback URL for this entry is: http://rodstagg.spaces.live.com/blog/cns!11725DEB07615960!244.trak Weblogs that reference this entry
|
|
|