Template talk:Countries of CONTINENT

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Useful template to potentially incorporate here later

[edit]

Often the name of the country is used within the place where you are actually using this template. Since we already have suffix and prefix, it may be useful to use {{str sub smart}}. The issue currently is that you cannot pass spaces as characters if they are in the beginning (for suffix) or at the end (for prefix).

What I have done on Category:Stamps of Azerbaijan by year for example is used the following:

{{countries of CONTINENT|{{subst:str sub smart|{{PAGENAME}}|prefix=Stamps of_|suffix=_by year}}|prefix=:Category:Stamps of|suffix=by year}}

You will note the need to add _ character and to remove ":Category:", but it makes it trivial to copy this string to other countries then. Hope it will help somebody out. ℺ Gone Postal ( ) 07:31, 25 January 2022 (UTC)[reply]