Search…

X3 Photo Gallery Support Forums

Search…
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Redirect back to previous page

12 Apr 2019, 04:50

Hi

I think this has been brought up before but dismissed for some reason?

I need to get from one subgallery to the previous gallery without going back to the main menu and ploughing through all the links to get back one link?

I know I can add this
    <a href="javascript:history.go(-1)" title="Return to the previous page">« Go back</a>
in the content box and it works great but doing this in every gallery would sometimres be forgotten,
is there a way for this to be auto added in some way enabled/disabled in main settings and/or galleries.

Not everyone likes to press the back button

People do wish to go back a gallery quickly and will put them off having to access the main stream of links/sublinks just to go back one

Geo

 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Redirect back to previous page

12 Apr 2019, 06:01

You are right that "breadcrumb navigation" is not a current feature of X3, although it has been considered.
amateur56 wrote:I need to get from one subgallery to the previous gallery without going back to the main menu and ploughing through all the links to get back one link?
<a href="javascript:history.go(-1)" title="Return to the previous page">« Go back</a>
For reference, the code above will not specifically go back to the PARENT page of the gallery (unless that is where they navigated from). It will go back to the LAST PAGE the visitor was on. If the visitor was on /galleries/art/picasso/, then navigated to /galleries/ from the menu, the BACK button would take them to /galleries/art/picasso/. For me, this would be misleading and unproductive ... Surely, if I wanted to go "back to the page I was on before this page", I would know I have a browser-back button to do just that, instead of ploughing through a menu because I never knew browser-back existed. In gallery-context, if anything, I would assume a <<BACK type button to take me to the parent gallery, regardless of what page I arrived from.

Optionally, you could create a "back to parent page" with the following:
Code
<a href="../"  class="btn">Back</a>
The above will not necessarily take the visitor back to the page they were on last, but always to the parent page of the current page /galleries/art/picasso/ -> /galleries/art/. If you need a back button, this would be my expected behavior when clicking the button.
amateur56 wrote:in the content box and it works great but doing this in every gallery would sometimres be forgotten,
is there a way for this to be auto added in some way enabled/disabled in main settings and/or galleries.
Considering this is not a current feature of X3, there is no super-productive was to enable/disable it per page. You can for example add the link globally to Settings > Page > Context > Content Prepend:
Code
<a href="../"  class="btn back-link" title="Go to parent gallery">Back</a>
Then, you could add a style in Settings > Custom > Custom CSS to disable it for some pages (for example index page):
Code
.back-link-disabled .back-link {
 display: none;
}
For the pages you don't want it to appear, add the back-link-disabled class to context:
Image
amateur56 wrote:Not everyone likes to press the back button
I don't like clicking browser [back] either. However, adding the back button directly into the website itself won't make me want to click it any more. At best, I would mistakingly believe it to be a "back to parent page" button. If I know it's a "javascript:history.go(-1)" button, I would much prefer to use native browser-nav controls at my own discretion ... It's not like I ever visited a website and thought "Damn this website. Why doesn't it include controls to navigate back to the last page I was on?"
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 04:23

Great I'll try that...
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 04:36

mmm I dont know if Im on the same ver as you? I have the lastest ver...
I cant find
example add the link globally to
Settings > Page > Context > Content Prepend:
I dont have "Content Prepend:"  in the context dropdown anywhere

-Context -
Default settings for the page context layout.

Can you be more specific as to where Ive to add
<a href="../"  class="btn back-link" title="Go to parent gallery">Back</a>
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 04:39

mmm maybe its in the
include dropdown not the context one?
Settings > Page > Include > Content Prepend [html]

Is this correct
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 04:42

For anyone else wanting to do this
This is my correct place to add. <a href="../"  class="btn back-link" title="Go to parent gallery">Back</a>
Settings > Page > Include > Content Prepend [html]
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: Redirect back to previous page

13 Apr 2019, 05:20

Yes sorry, global settings > page > include > content prepend.
Image
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 06:34

cool, works great
 
amateur56
Experienced
Topic Author
Posts: 27
Joined: 12 Apr 2019, 04:31

Re: Redirect back to previous page

13 Apr 2019, 06:35

breadcrumbs would defo be a great idea though :)