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:
  • {{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

See Also