This topic contains 3 replies, has 2 voices, and was last updated by Sean Sean 2 years, 6 months ago.

How to handle Ajax calls in sidebar menu


  • Daniel
    Participant

    Posts: 1
    Member Reply #4967

    Good day,

    The project that I am currently busy with requires the content data be loaded via ajax based on link clicks in the sidebar menu. Within the layout.js file I noticed that Ajax handlers already exists. I have not been able to find any information in the documentation (I may have missed it due to insane amounts of coffee).

    Can you provide a bit of information regarding the easiest way to implement ajax calls based on clicks on sidebar menu links? I assume it is possible without having to alter any of the code provided with the theme?

    Thank you for your efforts with this awesome theme package. It has been money well spent.

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #4992

    Hi,

    You can try to using this feature by adding “ajaxify” class to the LINK element of the sidebar menu items.

    Also add your ajax content wrapper inside “page-content” DIV as a child DIV with “page-content-body” class.

    If you need any further assistance please let us know.

    Thanks.


    Daniel
    Participant

    Posts: 1
    Member Reply #4995

    Works like a charm. Thank you

    Sean
    Sean
    Keymaster

    Posts: 4527
    Support Staff Reply #5033

    You are very welcome! Good luck with your project 🙂

You must be logged in to reply to this topic.