Changing page layout based on the user input