Append Link

When readers click on an append link the new card loads below the current one. That means, append links are just like normal links but with a special loading behavior.

Create an append link

Append links are normal links with an additional building block. This block contains a special keyword: append.

:CARD: pizza question

Have you tried Francesca's special pizza yet?
:LINK: Yes | yes card | append
:LINK: No | no card | append

:CARD: yes card
Great! Didn't it feel like swallowing a piece of heaven?

:CARD: no card
Well, you definitely should as soon as you can.

When you click an append link, the new card does not replace the old one but gets displayed below it.

The append keyword only works as the third building block on a link. You must write your link with separate blocks for linktext and linktarget.

Workflow tip: Instead of the keyword append you can use the shorthand a.

Link management

Consider this common scenario in interactive texts: There are several links on a card. When the readers make their choice and click a link the card disappears – and with it the other links they could have clicked.

With append links, however, the old card along with its links remains visible. In order to maintain the structure of the text, Hypstory manages links on old cards in a special way:

:CARD: menu

A sign at the door reads:
Today's menu at Alfonso's:
1. Pizza Aglio (anti valentine's edition)
2. Pizza Piccante (dragon fire edition)
While you look at the menu, Alfonso adds with a smirk: "And for our little bambini we also have uncle Alfi's special: :LINK:the French-Fries-with-Ketchup-Pizza. | bambini choice | append:: What would you like?"
:LINK: Pizza Aglio | grownup's choice | append
:LINK: Pizza with super hot peppers | grownup's choice | append

:CARD: grownup's choice
"An excellent choice!" remarks Alfonso.

:CARD: bambini choice
"The ketchup pizza! I want the ketchup pizza!"
Alfonso bursts out laughing: "Sure? Aren't you 37 years old already?"

There are two kinds of append links here: The first one is inside the paragraph where Alfonso introduces his special. The other two are outside a paragraph – each on its own line.

When an append link is clicked two things happen:

  1. Links in the current card that are inside a paragraph become unclickable and their text remains.
  2. Links in the current card that are outside a paragraph disappear.

So when the new card is appended below the old one, Hypstory assumes that a decision has been made. Hence, alternative options cannot be clicked anymore – as would be the case if the old card were replaced by the new one.

Sticky append links

Append links are useful in many situations. You might even use them exclusively and create a Hypstory that builds up as the readers go on.

But in certain situations, e.g. when you write dialog, you may want a clicked link's text to remain visible. For that, links can have an additional keyword: sticky.

:CARD: dialog alfonso start

"Where have you been so long, my friend?" Alfonso asks as you come in. :LINK: "You haven't been at Francesca's, have you?" | he knows | append::
:LINK: "You and I have been friends for so long and I want to tell you. But I can't," you stammer. | sorry | append,sticky
:LINK: "I've been very busy enjoying Francesca's pizza. And I'm feeling a little guilty, too, I guess." | sorry | append,sticky

:CARD: he knows
How does he know that, you ask yourself. An expression of guilt conquers your face and you turn your head.
"I see. Good old Francesca. I taught her the craft from day one and now she steals my best customers. Tisk, tisk."
:LINK: "But Alfonso, I..." | sorry | append,sticky

:CARD: sorry
He puts on a big grin: "Don't worry, my friend. I saw you in Francesca's shop the other day. It's okay. Her pies are marvellous. In fact, many years ago I was her apprentice."

All links in this example are append links. Those that are outside a paragraph have the additional sticky keyword.

As described above, these links normally disappear after clicking. But because of sticky their text remains visible.

Workflow tip: Instead of the keyword sticky you can use the shorthand s. Just like the keywords, their shorthands must be separated with a comma: a,s.

Append link shorthands

You can also create append links with the :APPEND: tag or the short tag :A:. These links do not need the append keyword.

Here's an example with a variety of append links:

:CARD: toppings

:APPEND: I'd like some mo' oregano.|toppings|sticky
:A: There's still room for some garlic.|toppings|s

:LINK: Extra cheese, please.|toppings|append,sticky
:L: This pizza needs more peppers.|toppings|a,s

|| Let's see, what else I want...|toppings|a

As you can see, there's some flexibility when creating links. You should find the way you like best and stick to it. If some of the links above look alien to you, you will find answers in the article about simple links.

Links created with the :APPEND: tag are not automatically sticky. If you want them to remain visible after clicking, you still need to add the sticky keyword.