Shanmen

The Gate of Shanmen or Hall of the Shanmen or simply Shanmen, is the entrance gate of a Buddhist temple. In ancient times, nearly all Buddhist temples had a single Shanmen gate leading into a large hall for the temple. Today, it is observed that most of the surviving Chinese Buddhist temples follow the hall style but have three main gates incorporated into their construction. After successive wars and cultural discontinuity, most Chan Buddhist temples have changed the middle gate into a hall entrance, called "Hall of Shanmen". The Shanmen is the most important gate of a Chan Buddhist sect temple.

Etymology
One theory is that "Shanmen" takes its literal meaning of "Mountain Gate", because temples were traditionally built in forested mountain areas where Chan monks could seclude away from secular life. Another suggests that during various episodes of suppression of Buddhism in Chinese history, monks moved their monasteries deep into the mountains, and later built gates at the foot of the mountain to guide pilgrims to the temples. A further theory is that "Shanmen" is a corruption of "Sanmen", or "Three Gates", referring to the "three gateways" to liberations. (三解脫門) in the Dharma – the "Kongmen" (空門; emptiness liberation), "wuxiangmen" (無相門; no-aspects liberation) and "wuyuanmen" (無愿門; desireless liberation). This latter view correlates with the traditional structure of Chan temples which included three gateways, said to symbolise the three gateways.

Architectural styles
Historic Shanmens in China are either a gateway of the paifang style, or a more substantial building, typically with three archways. When a more substantial temple building is built, the two side gateways might be simplified to arched or circular windows, leaving only the middle gate for access. The gate building may be called the "Hall of Three Liberations" or "Hall of the Mountain Gate".

Traditionally, if the Shanmen takes the form of a gate building, the statues of two figures from Buddhist lore are erected in that hall to guard the entrance, identified as "Heng and Ha" or the "A-un" Nio in Japanese. Such is the arrangement at the Jietai Temple in Beijing.

In some Chan temples, the Shanmen building is combined with the Hall of the Four Heavenly Kings, so that the Four Heavenly Kings serve as guardians of the gateway to the monastery. In other Chan temples, the Shanmen building is combined with the Maitreya Hall, with a statue of the Maitreya Buddha erected in the centre of the hall. This is the arrangement seen at Shaolin and Longhua temples. Some Chan temples combine both the Maitreya Hall and the Hall of the Four Heavenly Kings with the Shanmen, so that the entrance building also features the statue of the Maitreya Buddha at the centre, as well as the Four Heavenly Kings on the sides. Such an arrangement is found at the Lingyin Temple, in Hangzhou, Zhejiang Province, China.

Heng and Ha
In niches positioned on both sides of a Shanmen Hall, there will be enshrined a statue of a heavenly deity with a Vajra in his hand. These deities are called Nio—Buddha's warrior attendant. They may also be known as the "Yakasha Deity" or "Zhijingang". Vajra originally refers to the short metal weapon of the King of All Heavenly Deities, named Indra in Indian mythology. It symbolises solidness and sharpness in Buddhism. Nio is a Dharmapala who protects Buddhism with the ever present Vajra in his hand.

Originally, there was one Nio incorporated into a temple. After the introduction of Buddhism from India to China during the Eastern Han Dynasty (25-220), however, the Chinese people cast two Nio to safeguard the mount gate. This is to satisfy the Chinese custom of deities being in pairs. The Nio wear crowns, ethereal clothes (exposing the well-developed muscles of their upper bodies), and knee-length skirts. The Nio have wide-open eyes and protruding noses. They hold weapons in their hands and angrily glare at the ground, projecting an awesome persona. The Nio on the right has its mouth open to pronounce the sound "a", while the one on the left has its mouth closed in order to utter the sound "hong". The generic name for those statues with an open mouth is General Ha (哈將軍; Japanese: 阿吽); and for those with a closed mouth General Heng (哼將軍; Japanese: 阿形).