Ajax Content Page loading content via ajax
Page contents can be loaded via ajax. To enable ajax content loading for the sidebar menu you can follow below steps:
1. Add a DIV wrapper with page-content-body
class under page-content
DIV of the page content.
2. Apply ajaxify nav-link
class to links of the sidebar menu and specify the content URL using href="some_ajax_content.php"
link attribute.
3. Use Layout.loadAjaxContent('some_url.php')
to load an ajax content programmatically
4. Use Layout.addAjaxContentSuccessCallback(function(res){ // res is ajax response object })
to add ajax success callback function
Use Layout.addAjaxContentErrorCallback(function(res){ // res is ajax response object })
to add ajax error callback function