Provide a link to create a page with a form from a failed search
From semantic-mediawiki.org
Semantic extension(s): | Page Forms |
Further extension(s): | -/- |
Keyword(s): | -/- |
Description:
When a user searches for a page on your wiki, if no such page exists, they will be taken to the search results page with a message that reads,
- There is no page titled "$1". You can create this page.
where $1 is the name of the page that was searched.
However, It would be nice to give the user the option to create the page using one of the forms on your wiki... To do this you will need to edit one of your wiki's 'messages'. Messages are pages on your wiki that store message text like the above.
Here, I'm editing the text of MediaWiki:Noexactmatch, which creates the above text and is used on the 'failed search' page:
'''There is no page titled "$1".''' You can [[:$1|create this page]]. To create a <form> called '$1', click {{formlink: <form> | here | link | form=<form>&target=$1 }}
where <form> is the name of the form that you expect the user to use.
This could be improved by using a form selection combo box, but I'm not sure how to do that!