Topic on Project:Support desk

Person Name and Name person

8
Lunablues (talkcontribs)

how to insert a name as Glenn John but have an equivalent John Glenn, and how to do for insert automatically this name into a biography for example but also in an other category ?

88.130.80.241 (talkcontribs)

Do you say that you cannot have two articles, one called "Glenn John" and the other one called "John Glenn"? I don't see a problem here. That should work...

Lunablues (talkcontribs)
88.130.115.143 (talkcontribs)

So what you want is a redirect from "John Glenn" to "Glenn John"?

Lunablues (talkcontribs)

yes manually it's not difficult, but hot to do automatically and how to insert this entry automaticaly in a other list, for referring all the name taken in template biography for example ?

88.130.115.143 (talkcontribs)

I don't think there already is a way to do that automatically. But you could try write one on your own. Hooks are your friend. You could pick a hook, which is executed when someone has succesfully created a new page, then inside that hook check the page object, take the page title out of it, create another page with flipped name and set the page content to #REDIRECT[[<old name here>]].

In the above idea you might need some more code, if this stuff should not be applied to all pages; maybe do it only if the new page is in a certain namespace or so...

Reply to "Person Name and Name person"