Player profile widget
Description
The Player profile widget is the same as the Team widget, but for players. It provides basic and advanced statistics about a player, as well as odds information. Also, you can filter statistics by team/tournament/season.
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 by two ways:
- Bind the widget without initial options. The required attribute here is "data-widgetId"
<div data-widgetId="player"></div>
- Bind the widget with initial options. All available options can be seen below
<div data-widgetId="player" data-options='{...}'></div>
- The optional "data-options" attribute:
{
int playerId: 1, // Unique identifier of the resource.
int teamId: 2434 // Unique identifier of the resource.
int tournamentId: 5 // Unique identifier of the resource.
int tournamentSeasonId: 5 // Unique identifier of the resource.
strin lang: 'en', // the language in format like: en, bg, ru and etc.
string theme: '', // Brand theme
string expand: null, // Specifies additional information to include with the Team response
boolean canSelectMarkets -> // Show/Hide markets dropdown
int eventId: 365689 // Unique identifier
string oddClient,
oddProviderIds: [43,5,33,154] // specify available odd providers by their ID
obj market: {"name":"1x2"}// Specify default market for odds
display: ['odds', 'info', 'stats'] // array of sting to identify are odds and stats shown in player profile widget
displayTeamShortNamesOnDesktop: (true/false) -> // This option replaces the team name with its short name on all resolutions, if "displayTeamCustomNamesOnDesktop" is not added
displayTeamShortNamesOnMobile: (true/false) -> // This option replaces the team name with its short name on mobile resolutions, if "displayTeamCustomNamesOnMobile" is not added
displayTeamCustomNamesOnDesktop: (true/false) -> // This option replaces the team name with its custom name on all resolutions
displayTeamCustomNamesOnMobile: (true/false) -> // This option replaces the team name with its custom name on mobile resolutions
}
Player profile widget 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 Player profile widget in blocky
The Player profile widget always displays basic information about a player such as positions, year of birth, country, height, etc.
-
To add only basic information about a player, enter your desired player in the Player field, and select Save block.
-
If you want to add advanced information about a player and odds about upcoming matches of a player’s team, select the Display statistics and Display odds options.
Video example
Updated almost 2 years ago