Showing voting result (rating.result)
Description and parameters
Component is designed for displaying rating results. Component is hidden, it cannot be used via visual editor.
Call example
<?$APPLICATION->IncludeComponent("bitrix:rating.result","", Array( "RATING_ID" => "1", "ENTITY_ID" => "46", "RATING_NAME" => "Рейтинг", "CURRENT_VALUE" => "12.7", "PREVIOUS_VALUE" => "0.7", ), null, array("HIDE_ICONS" => "Y") );?>
Parameter description
Field | Parameter | Description |
---|---|---|
Rating ID | RATING_ID | Object name to be subjected to a vote (USER, FORUM_POST, BLOG_COMMENT). |
Rate object ID | ENTITY_ID | Rated object ID. |
Rating name | RATING_NAME* | Indicate rating name. |
Current result | CURRENT_VALUE* | Current rating value. |
Previous result | PREVIOUS_VALUE* | Previous rating value. |
Additional information
If you do not indicate parameters marked by an asterisk (*), the data will be uploaded automatically. It's recommended to indicate parameters for cases of multiple component calls (for example, in the comment list).
Parameter RATING_NAME may be skipped even in the case of muдешзду component call. You need to use the function CRatings::GetRatingResult to retrieve data.
See Also:
- Method CRatings::GetRatingResult
© «Bitrix24», 2001-2024