Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

"Previous" function?

Is there a "previous" function available for returning users to their last visited story element?

Comments

  • Which story format are you using because each one has different features and their own way of doing things.

    Harlowe:
    note: the following moves the Reader forward (not back) to the last passage they viewed, thus adding the current passage to the Reader's passage history.
    (link-goto: "Previous (Forward)", (history:)'s last)
    

    If you want to actually move backwards to the previous passage and remove the current passage from the Reader's passage history then you are going to have to use some javascript like the following:
    <a class="back" onclick="$('tw-sidebar tw-icon.undo').trigger('click');">Previous (Backward)</a>
    
    You can style the above anchor element to look like a normal link by adding the following to your Story Stylesheet:
    tw-passage a.back {
    	color: #4169E1;
    	font-weight: 700;
    	text-decoration: none;
    	transition: color 0.2s ease-in-out 0s;
    	cursor: pointer;
    }
    tw-passage a.back:hover {
    	color:#00bfff;
    }
    

    SugarCube:
    This story format has two build in macros <<back>> and <<return>> will do what you want, one rewinds history and the other does not.
  • Nice! Thank you. I'm still pretty new and didn't understand what the formats are all about. This shows me why they matter AND answers my question.
Sign In or Register to comment.