Whether serving as showcases for parties seeking greater recognition or running as candidates themselves, many mayors elected in March have found themselves at the center of attention in a campaign where every endorsement counts.