Widget filter components

Hey can anyone tell me how can i filter butons with check box or button . My menu conteins for example 80 buttons that change materials so i want to filter those buttons by contetnt that i cant put in the name of the button .

286083-qweqwe.jpg