Code Guide/Story Format

# Overview

A guide to convert old story format (tabview) to the new format.

Sub/idol stories have a slightly different format compared to main/event/gacha stories.

## Main/Event/Gacha Stories

These are the overall steps:

1. Create the chapter list
2. Copy content of the story's cover page to the story's main page
3. Add navigation bar and chapter list on main page
4. Add navigation bars on each chapter page

You can find code/examples for each step below.

[./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival Sakura Festival] is already fully converted, you can use it as reference.

## Sub/Idol Stories

These are the overall steps:

1. Create the story list
2. Replace the main page's content with the sub story cover template
3. Add navigation bars on each chapter page

You can find code/examples for each step below.

[./https://ensemble-stars.fandom.com/wiki/Chiaki\_Morisawa/Sub\_Story Chiaki's sub story page] is already fully converted, you can use it as reference for sub story pages.

[./https://ensemble-stars.fandom.com/wiki/Eichi\_Tenshouin/Idol\_Story Eichi's idol story page] can act as a reference for idol story pages.

# Chapter List Page

Create a subpage (Story Title/Chapters) with the chapters as a grouped list.

Add this code to the end of the page to set the category for this page:

```
<noinclude>[[Category:Chapter List]]</noinclude>

```

## Main/Event/Gacha Stories

List criteria:

* group by chapter title
* chapter links are "Ch x" with x being the number
* separate the chapters with one hyphen
* a group with one single chapter should be a link

Example:

Subpage: [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Chapters Sakura Festival/Chapters]

* [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Prologue Prologue]
* Cherry Blossom Flowers: [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Flowers\_-\_1 Ch 1] - [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Flowers\_-\_2 Ch 2]
* Cherry Blossom Tree: [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Tree\_-\_1 Ch 1] - [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Tree\_-\_2 Ch 2] - [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Tree\_-\_3 Ch 3]
* Cherry Blossom Banquet: [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Banquet\_-\_1 Ch 1] - [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Cherry\_Blossom\_Banquet\_-\_2 Ch 2]
* [./https://ensemble-stars.fandom.com/wiki/Sakura\_Festival/Epilogue Epilogue]

If the chapters don't have titles, create the chapter list like this:

[./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_1 Ch 1] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_2 Ch 2] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_3 Ch 3] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_4 Ch 4] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_5 Ch 5] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_6 Ch 6] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_7 Ch 7] - [./https://ensemble-stars.fandom.com/wiki/Dance\_on\_Ice/Chapter\_8 Ch 8]

## Sub/Idol Stories

The grouped list for sub stories is created with this template: [./https://ensemble-stars.fandom.com/wiki/Template:SubStoryList Template:SubStoryList]

See the documentation on the template's page on how to use it.

# Cover Page

## Main/Event/Gacha Stories

Copy the content of the cover page and replace the story's main page content with it.

Pleas **don't** copy the category at the end of the cover page and **don't** remove the categories on the main page.

Cover page has "/Cover" after the story title, e.g. [./https://ensemble-stars.fandom.com/wiki/Fortune\_Banquet/Cover Fortune Banquet/Cover].

Main page is [./https://ensemble-stars.fandom.com/wiki/Fortune\_Banquet Fortune Banquet], which currently contains the tabview.

# Main Page

## Main/Event/Gacha Stories

After copying over the contents of the cover page:

1. Change the template from "StoryCover" to "StoryCover2".

```
From:
{{StoryCover
To:
{{StoryCover2

```
2. Then find the "Translation Notes" parameter and add "First Chapter" above.

```
...
...

```
3. Add the name of the first chapter.

```

```

## Sub/Idol Stories

Replace the content with this template: [./https://ensemble-stars.fandom.com/wiki/Template:SubStoryCover Template:SubStoryCover]

For ! sub stories, use following image: "{character's full name} Anime Chibi"

For !! idol stories, use following image: "{character's full name} Work Unit Outfit chibi"

Example:

```
{{SubStoryCover
}}

```

# Chapter Pages

On the top and bottom of each chapter page, add the [./https://ensemble-stars.fandom.com/wiki/Template:StoryNavBar StoryNavBar template] (the page also has a user doc). The template at the bottom will contain the chapter list for main/event/gacha stories and the story list for sub/idol stories. Please don't put any empty lines between the nav bar and the story.

There are two ways to set the link for previous and next chapter depending on the chapter naming format.

## Simple Numbering

If the chapter naming format is "Chapter 1", "Chapter 2", etc., putting the number suffices.

E.g. on Chapter 2, you would put this code:

```
{{StoryNavBar
}}

```
If the separator is a different character, e.g. hyphen, you can tell the template by setting the "delim" parameter.
E.g. for naming format "Chapter-1", "Chapter-2" etc., the code would look like this:

```
{{StoryNavBar
}}

```

## Chapter Titles

If the chapter naming format doesn't follow simple numbering, you need to put the part of the page title after the slash. E.g. the page title is "Sakura Festival/Cherry Blossom Tree - 1", then you need to put "Cherry Blossom Tree - 1" as value.

```
{{StoryNavBar
}}

```

## Both Numbering and Titles

Both ways to link chapters can be used in the same template as well.

E.g. if you are on Chapter 1 and the previous chapter is titled "Prologue" and the next is titled "Chapter 2", it would look like this:

```
{{StoryNavBar
}}

```

## First and Last Chapter

First chapters don't have a previous chapter, so you can leave out the "prev" parameter:

```
{{StoryNavBar
}}

```
Similarly for last chapters, you can leave out the "next" parameter.

```
{{StoryNavBar
}}

```

## Bottom Navigation Bar

The navigation template at the bottom of a chapter page should display the chapter/story list. The list is added by setting the chapter page to the "chapter list" parameter for main/event/gacha stories and to the "story list" parameter for sub/idol stories:

Example for main/event/gacha story:

```
{{StoryNavBar
}}

```
Example for sub/idol story:

```
{{StoryNavBar
}}

```