Tailoring the absorption in a photonic crystal membrane: A modal approach