Template:Link-and-categorize-comma-seperated-list
From CPU Grave Yard
Description
If you have a string with commas and you want to link to category and join category for each value separately. Will work with single value or list. Will work with comma or comma-space separation.
If there is a link already in place, then it return the original text without linking or categorizing. it ignores any suffixes
If a suffix is entered the SUFFIX is added to each category. For example: if suffix=family and text=Pentium, then link and category will be Pentium family..
Usage
- {{Link-and-categorize-comma-seperated-list|TEXT|cat-suffix=CATSUFFIX|text-suffix=TXTSUFFIX}}
Examples
- {{Link-and-categorize-comma-seperated-list|alpha,beta,gamma}}
- Result: alpha, beta, gamma
- {{Link-and-categorize-comma-seperated-list|alpha}}
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha, beta, gamma}}
- Result: alpha, beta, gamma
- {{Link-and-categorize-comma-seperated-list|alpha}}
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha, [[beta]], gamma}}
- Result: alpha, beta, gamma
- {{Link-and-categorize-comma-seperated-list|alpha,beta,gamma|cat-suffix=_family}}
- Result: alpha, beta, gamma
- {{Link-and-categorize-comma-seperated-list|alpha,beta,gamma|cat-suffix=_family|text-suffix=_family}}
- Result: alpha_family, beta_family, gamma_family
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha/ beta/ gamma}}
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha}}
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha/ [[beta]]/ gamma}}
- Result: alpha/ beta/ gamma
- {{Link-and-categorize-comma-seperated-list|alpha/beta/gamma|cat-suffix=_family}}
- Result:
- {{Link-and-categorize-comma-seperated-list|alpha/beta/gamma|cat-suffix=_family|text-suffix=_family}}
- Result:
..
Notes
Requirements
- Extension:Loops
- Extension:Variables
- Extension:ParserFunctions
- Extension:RegexFunction
- Template:link-and-category
- Template:detect-link
See Also
Categories:
- Alpha
- Beta
- Gamma
- Alpha family
- Beta family
- Gamma family
- Templates