Metal-ion controlled solid-state reactivity and photoluminescence in two isomorphous coordination polymers