You are browsing the documentation for version 4.1 of OroCommerce, OroCRM and OroPlatform, which is no longer maintained. Security Support ends in January 2023. Read version 5.0 (the latest LTS version) of the Oro documentation to get the updated information.

See our Release Process documentation for more information on the currently supported and upcoming releases.

Client Side Navigation

Client Side Navigation allows to load page in different formats HTML or JSON in depends on request. First request form browser loads complete HTML page. All following requests are made by JavaScript and load page blocks in JSON format.

To get the page ready for the client side navigation, follow the steps below:

  • Add an additional check in main layout template:
{% if not oro_is_hash_navigation() %}
<!DOCTYPE html>
{% else %}
{# Template for hash tag navigation#}
{% include 'OroNavigationBundle:HashNav:hashNavAjax.html.twig'
    with {'script': block('head_script'), 'messages':block('messages'), 'content': block('page_container')}
{% endif %}


block(‘head_script’) -a block with a page related javascripts; block(‘messages’) - a block with system messages; block(‘page_container’) - a content area block (without header/footer) that is reloaded during navigation
  • To exclude links from processing with client side navigation (like windows open buttons, delete links), add an additional css class “no-hash” to the tag, e.g.
<a href="page-url" class="no-hash">...</a>

As part of the navigation, form submit is also processed with Ajax.