Posted by k74 on April 3, 2009 at 1:37pm
Jump to:
| Project: | Search 404 |
| Version: | 6.x-1.4 |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | zyxware |
| Status: | closed (fixed) |
Issue Summary
I needed to put a custom text above the search results 404. Or if can integrate the search in a block, so I put it below the display module custom error.
Thanks
Comments
#1
I had the same problem, plus I wanted to fix the page title. I ended up modifying search404.module. Not a preferred solution, but these should really be integrated into the module itself.
In search404_settings(), I added the following fields:
$form['advanced']['search404_page_title'] = array('#type' => 'textfield',
'#title' => t('Page Title'),
'#default_value' => variable_get('search404_page_title', false),
);
$form['advanced']['search404_page_text'] = array(
'#type' => 'textarea',
'#title' => t('Page Text'),
'#default_value' => variable_get('search404_page_text', false),
);
In search404_page(), I removed
$output = '<p>'. t('The page you requested was not found.') .'</p>';And added:
drupal_set_title(t(variable_get('search404_page_title', false)));$output = variable_get('search404_page_text', false);
#2
I added a block with the text that I was interested in showing, this block is only displayed on the page search404
#3
Hi k74
The solution provided by revnoah, should work, but what was the specific need that prompted the need for this?
If the feature is reusable and needed by other people, we could implement this in a future release.
Let me know if that is required.
Regards
Zyxware
#4
Solution from K74 made simple but If we can add custom text on search404 it will be more simple. If we not found what looking for then we can add it, the text intructions to add is from custom text.
#5
I would love to see an option to add custom text, ideally along with a custom page title.
#6
Just tried the solution by revnoah and it does work.
It's useful if you want a single generic message.
#7
Hi k74
After some consideration I have added this feature to search404 in the latest dev.
I have used revnoah, code with a little bit of change to be compatible with the current code base.
Regards
Santhosh Raju
#8
#9
Marking issue as fixed.
#10
Automatically closed -- issue fixed for 2 weeks with no activity.