split index and layout