Template synthesis of hierarchical porous metal–organic frameworks with tunable porosity