Templating and structural engineering in organic–inorganic perovskites | Synapse