renderFromApi
Block helper. Makes an API call and on complete, whether success or failure, it executes the given block of the code. The parameters are accepted as same as the jQuery ajax paramters except the functions. Please refer jQuery ajax call here
Params
url {String | Number}
Method {String}
Example:
avatar
Accepts params as normal image tag, one more extra param - name. Check for the profile picture for the user in the given url. If unavailable, then will render the first letter of the given name with the provided random image.
Example:
Pagination
The pagination helper is a block helper. The params needed for the pagination helpers are -
- list
- id
- class (optional)
- perPage (optional) : determines the number of items shown in a page
- page (optional) : current page no
- params (optional)
- paginationContainer (the nav container id where the pagination links should be rendered)