Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
Navigation - back
Navigation - back
How to make the navigation more intuitive to go to previous bookmark when the browser's back button is clciked?
Re: Navigation - back
Timo,
Sorry, but more intuitive Is a pretty open-ended thing to say, so I still don't understand what you mean.
Steven
Sorry, but more intuitive Is a pretty open-ended thing to say, so I still don't understand what you mean.
Steven
Re: Navigation - back
Users expect the back button to take them back to what they perceived to be their previous page.
Back button:

Example: Edit form is open, user hits the browser's back button. Expectation: Takes you back to the Browse form. What happens: Nothing.
Take Joomla as an example: The browser's back button works as expected (takes you to the previous page). Additionaly, breadcrumbs can be used, too.
Back button:

Example: Edit form is open, user hits the browser's back button. Expectation: Takes you back to the Browse form. What happens: Nothing.
Take Joomla as an example: The browser's back button works as expected (takes you to the previous page). Additionaly, breadcrumbs can be used, too.
Re: Navigation - back
Timo,
The back button reloads a whole web page - nuBuilder rebuilds pages without reloading a new page.
If your users find this an insurmountable problem you have two choices.
1. Fork nuBuilder and make the changes you want.
2. Try to get Joomla to do what nuBuilder does.
Steven
The back button reloads a whole web page - nuBuilder rebuilds pages without reloading a new page.
If your users find this an insurmountable problem you have two choices.
1. Fork nuBuilder and make the changes you want.
2. Try to get Joomla to do what nuBuilder does.
Steven
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Navigation - back
Here's another option: This will "disable/intercept" the browser's back button and take you back to the previous breadcrumb:
Add this js under Home ► Setup ► Header:
Add this js under Home ► Setup ► Header:
Code: Select all
function gotoPrevBreadcrumb() {
var l = window.nuFORM.breadcrumbs.length;
if (l > 1) {
nuGetBreadcrumb(l - 2);
}
}
function nuOnLoad() {
window.history.pushState({ page: 1}, "", "");
window.onpopstate = function(event) {
if (event) {
gotoPrevBreadcrumb();
} else {}
};
}
-
- Posts: 785
- Joined: Sun Oct 14, 2018 11:25 am
Re: Navigation - back
Small improvement: Works also if a modal window is open.
Code: Select all
function gotoPrevBreadcrumb() {
if (parent.$('#nuModal').length > 0) {
nuClosePopup();
return;
}
var l = window.nuFORM.breadcrumbs.length;
if (l > 1) {
nuGetBreadcrumb(l - 2);
}
}
function nuOnLoad() {
window.history.pushState({ page: 1}, "", "");
window.onpopstate = function(event) {
if (event) {
gotoPrevBreadcrumb();
} else {
}
};
}
Re: Navigation - back
@Steven: Forking nuBuilder for just that function is no option for me. And to migrate all my projects to joomla just because of a function that is not there is no option either.
@toms: This is exactly what I was looking for
This should be included in nuBuilder.@
@toms: This is exactly what I was looking for
