Forum:Grabbing redirect pagename

Is there anyway for me to grab the name of the redirect target from another page? Essentially, is there a way that if page 'Foo' redirects to the page 'Bar', using a function like would result in 'Bar'.


 * You could use #ifeq or #switch parser functions. For instance, . But unfortunately this prevents the automatic redirect from occurring. It would only work for soft redirects. --Gardimuer { ʈalk } 15:46, May 3, 2012 (UTC)