First let me show you how my current wiki entry looks like and what parameters I've set:
{{tracklist|Track1=Pokerface|Track2=Yellow Submarines|Track3=Yesterday}}
My goal is to generate a tracklist using a template, which is actually a table. In the left column there has to be the songnumber, and in the right column the songname.
To achieve this, I created a new wiki template, where I am using the loop function #while to count upwards and check if a song with such a number exists. You can find it on the end of my text.
Currently, I do not understand, why my code does not create a complete table. Only the first song gets print out. Someone able to help me?
{|
{{#vardefine: cTrack|1}}
{{#while:
|{{{Track{{#var:cTrack}}|}}}
|
{{!}} {{#var:cTrack}} {{!!}} '''{{{Track{{#var: cTrack}}}}}'''
{{#vardefine: cTrack|{{#expr: {{#var:cTrack}} + 1}}
{{#if: {{{Track{{#var:cTrack}}|}}} | {{!}}- }}
}}
}}
|}