I want to ask does the
if..else
help me to judge the extends file name?
No, you cannot do this withJade.
But you can solve the problem by including a file where you wrap the content of it into a block and in your jade file which should not show the content you can overwrite the block with no content
footer.jade
block footer
span copyright 2014
page_without_footer.jade
extends index
block main
p lorem ipsum
//- overwrite the footer with nothing / delete the block
block footer