Thread:Project:Support desk/Receive namespace number

Is there a way to receive the number of a namespace? E.g. on current page or by naming it. I.e. "1" for the Help namespace. I can't believe there's no magic word or tag for it. Do I really need to create a swtich template?