Add first matching mode

This Pull request provides a new mode. This only get the code of current page if it exists or of the first inherited page which contains any header/footer code.

You can get the PR as patch as well:
https://www.dropbox.com/s/ff1k9r5qtmyl8gb/Added_new_mode_for_only_getting_of_the_first_page_with_header_footer_code.patch