Page MenuHomePhabricator

Parser function to provide loop functionality
Closed, ResolvedPublic

Description

Author: marius.treitz

Description:
I would like to produce templates with lists. E.g. I want to create a page that
lists the courses that professors teach. Professor A might have 3 courses,
professor B might have 5. It would be easy to have a template that accepts a
random number of variables instead of a set number.
For example, the template could look like the following:
processall x*: '''x*'''
a template call such as {{name|x1=IT101|x2=IT114|x3=SLA442|...|xn=??????}}
should print out all the variables in bold.


Version: unspecified
Severity: enhancement

Details

Reference
bz2357

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:33 PM
bzimport set Reference to bz2357.
bzimport added a subscriber: Unknown Object (MLST).

You might be interested in [[m:Template:Foreach]].

robchur wrote:

*** Bug 6794 has been marked as a duplicate of this bug. ***