Zend certified PHP/Magento developer

How to show / hide a configurable product’s child product based on custom attribute value

I have a configurable product, which has 4 child products. I want to show the child products to the end customer’s product view page, based on a specific attribute value in the child products. (e.g ‘Hide child from product page’ set to ‘true’). So if one of those 4 product has this attribute value set as true, then only 3 options will be visible on the product page, despite of that product being in stock, and enabled.

Disabling the child product does exactly this , but I am looking for a possibility of doing this without disabling it.