Template:Main-gallery

If the page name matches the Gallery name (e.g., Metroid Prime & Gallery:Metroid Prime),  is sufficient.

If they are different in any way (e.g., Metroid (game), Gallery:Metroid), you must add the gallery title as a variable, i.e:

e.g.,  gives:

The original template is from the Super Mario Wiki.