Template:Main-gallery

If the page name matches the Gallery name (e.g., Super Mario Bros. & Gallery:Super Mario Bros.),  is sufficient.

If they are different in any way (e.g., Mario & Sonic at the Olympic Games (Wii), Gallery:Mario & Sonic at the Olympic Games), you must add the gallery title as a variable, i.e:

e.g.,  gives: