Squad/Team Players Widget
Description
The Squad/team players widget lets you display the whole squad or selected players in specific positions.
Bind the widget to HTML DOM
Make sure that you have the loader already set up on your website.
If not, follow our guide:
You can bind the widget to the HTML DOM in two ways:
- Bind the widget without initial options. The required attribute here is "data-widgetId"
<div data-widgetId="widget-team-players"></div>
- Bind the widget with initial options. All available options can be seen below
<div data-widgetId="widget-team-players" data-options='{...}'></div>
- The optional "data-options" attribute:
{
int teamID: 1, // Unique identifier of the resource.
string lang: 'en', // the language in format like: en, bg, ru and etc.
string playerUri: 'player-' //Scheme for the player links
array categoriesDisplay: ['keeper', 'defender', 'midfielder', 'forward', 'unknown'] //List of player categories to dispaly,
array injuredPlayers: [ '3777', '178423', '3961', '3570' ] // List of injured players ids,
array suspendedPlayers: [ '3961', '3570' ] // List of suspended players ids,
if no such list is provided it will display all categories
}
Odds listing in the CMS
Currently, the Sportal365 CMS offers a variety of football widgets to enable creators to add sports-specific statistics and context to their articles, videos, or galleries.
Adding Squad/Team Players Widget in Blocky
Information about the whole team
If you want to display all team players, select all options under the Team field in Blocky.
The Display unknown option is selected to ensure that all players are included, in cases when data providers don’t specify the player's position.
Information about players in a specific position
If you want to provide contextual information about players in a specific position, select the position you wish and Save the block.
For example, if you wish to display information about “midfielders,” select the Display midfielders option and Save the block.
Information about injured and suspended players
Тhe Squad/team players widget can also display injured and suspended players.
When you select to display injured players, a yellow cross will appear next to the name of the player that is injured. When you select to display suspended players, a red card will appear next to the player that is suspended
Video example
Updated almost 2 years ago