User:VeganCritter/Desktop/ChapterNavboxPlanning

I want to make a chapter navbox generator.

For each chapter, I'd make &#91;&#91;Template:Nav-ChapterX-Data&#93;&#93;, where X is the chapter number/letter. In that template, I would put something like this:

&#123;| Chapter Navbox Generator

&#125;

You can make template parameters default to empty (and disappear) by using a | with no string:

ep1 = &#123;&#123;&#123;ep1|&#125;&#125;&#125; ep2 = &#123;&#123;&#123;ep2|&#125;&#125;&#125; ep3 = &#123;&#123;&#123;ep3|&#125;&#125;&#125; ep4 = &#123;&#123;&#123;ep4|&#125;&#125;&#125; ep5 = &#123;&#123;&#123;ep5|&#125;&#125;&#125; ep6 = &#123;&#123;&#123;ep6|&#125;&#125;&#125; ep7 = &#123;&#123;&#123;ep7|&#125;&#125;&#125; ep8 = &#123;&#123;&#123;ep8|&#125;&#125;&#125; ep9 = &#123;&#123;&#123;ep9|&#125;&#125;&#125; ep10 = &#123;&#123;&#123;ep10|&#125;&#125;&#125; ep11 = &#123;&#123;&#123;ep11|&#125;&#125;&#125; ep12 = &#123;&#123;&#123;ep12|&#125;&#125;&#125; ep13 = &#123;&#123;&#123;ep13|&#125;&#125;&#125; ep14 = &#123;&#123;&#123;ep14|&#125;&#125;&#125; ep15 = &#123;&#123;&#123;ep15|&#125;&#125;&#125;

// create variable for counting number of episodes, then set to 0 create integer variable countEps set countEps = 0

// create variable for iterating epX parameter create integer variable epParamNum set epParamNum = 1

// create string variable for evaluation create string variable epParamName set epParamName = &#123;&#123;&#123;epepParamNum&#125;&#125;&#125;

// set countEps to the number of episodes (desired entries in the table) while ( epParamName is not empty ) &#123;	countEps++; epParamNum++; &#125;

// now we know how many episodes there are: countEps // next, we need to figure out which episodes go into the three columns // let's divide by three, then round up create non-integer variable colLength set colLength = countEps / 3

if ( colLength is not an integer ) &#123;	round colLength up to nearest integer &#125;

// now we need to assign each episode to the appropriate column // episodes are listed down columns in ascending order, like so: // 		Column A	Column B	Column C // Row1		ep1		ep6		ep11 // Row2		ep2		ep7		ep12 // Row3		ep3		ep8		ep13 // Row4		ep4		ep9		ep14 // Row5		ep5		ep10		ep15

// create a counter for each column create integer variable countColLengthA create integer variable countColLengthB create integer variable countColLengthC set countColLengthA = colLength set countColLengthB = colLength set countColLengthC = colLength