Certain elements of your page may require a regular navigation to work properly. For example, you may have downloadable content that you want to share with the user. In these cases, SPA must be disabled for those specific elements. You can disable SPA at these scopes:
- disable SPA across an entire Liferay DXP instance
- disable SPA in a portlet
- Disable SPA in individual elements
Follow the steps in the corresponding section to disable SPA for that scope.
To disable SPA across an entire Liferay DXP instance, add the following line to
To disable SPA for a portlet, you must blacklist it. To blacklist a portlet from SPA, follow these steps:
Open your portlet class.
com.liferay.portlet.single-page-applicationproperty to false:
If you prefer, you can set this property to false in your
portlet.xmlinstead by adding the following property to the
Alternatively, you can override the
isSinglePageApplicationmethod of the portlet to return
To disable SPA for a form or link follow these steps:
data-senna-offattribute to the element.
Set the value to
true. See the example below:
<a data-senna-off="true" href="/pages/page2.html">Page 2</a>
Nice! Now you know how to disable SPA in your app.