I would like to modify the displayed page title (not change the actual
page name) and some text based on the link it came from. If I can do it
by editing the wiki page then great. Otherwise, what are some approaches
to changing PHP code to solve this kind of problem? I'm new to wikis but
have experience with PHP.
Why I want it is described by the following situation within the
hierarchy of the List of Birds article in Wikipedia. There is a page for
Great Northern Diver (The UK name) which is called Common Loon in North
America. If the page is linked to from a list of North American birds
then Common Loon should show as the page title and a variable should be
available for other occurances of the name within the content. It's
important to maintain the single page for the bird content. Of course
this is on my own wiki system and not Wikipedia itself.
What comes to mind is to pass the information on the request from a link
on a page with list of birds to the target page, Great Northern Diver. A
piped link like [[Great Northern Diver|Common Loon]] would, through a
code change, cause "Common Loon" to be passed as an item on the request.
Another code change would allow the title to be set to the piped name
and make it available as a variable. A non-piped link like [[Great
Northern Diver]] would not pass the data on the request and the variable
value would default to the name of the page.
Is this a reasonable approach?
Tim
Show replies by date