What I know about this - Vaalan endru oru arakkan who was harassing Devas. So Indra took the help of Muchukunda Chozha (whether there was really a king like this I don't know). Anyways Muchukunda killed the rakshasa and helped Indra, Indra asked him for what he wanted in return, being a shiva devotee he wanted a non linga, moorthy image of Shiva at Tiruvarur. Since Shiva could not take human form due to a curse by Bhrigu, Indra was in a dilemma - and decided to test Muchukunda by showing him 7 identical idols of Shiva, hoping he may not identify the right one to install at Tiruvarur. Muchukunda identifes the original with Shiva's grace and his bhakthi removes the shadow on Shiva too that he cannot be present in idol form.
7 idols were installed Thiruvarur , Thirukkuvalai , Thiruvaimur , Thirukkaravasal , ThiruNallar , Vedaranyam and Nagappattinam . These temples are called SapthaVidanga Temples.