building template tag for ajax post