BattlePro / battlepro-issues

1 stars 0 forks source link

Results page getting "current stage" as opposed to the stage being viewed #332

Closed Ian-Hitt closed 6 years ago

JakeBooher commented 6 years ago

That's because you're overwriting $stage with your loop


                        <xen:foreach loop="$stages" value="$stage">
                            <option {xen:selected "{$stage_num} == {$stage.stage_key}"} value="{xen:link tournaments/view-results, $tournament, "stage={$stage.stage_id}", "round_num={$roundData.roundNum}"}">{$stage.name}{xen:if "{$stage_num} == {$stage.stage_key}", ' (current stage)'}</option>
                        </xen:foreach>

Also, don't use stage_key and stage_num, you'll need to use stage_id