Moved the platform conditional outside of the loop and created a partial so it could be called in the loop without a condition check.