[documentation] [Documentation bug] PHPTemplate default
page.tpl.php example problem
bradlis7
drupal-docs at drupal.org
Mon May 8 02:33:19 UTC 2006
Issue status update for
http://drupal.org/node/52486
Post a follow up:
http://drupal.org/project/comments/add/52486
Project: Documentation
Version: <none>
Component: Developer Guide
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: bradlis7
Updated by: bradlis7
Status: active
I think I may have this right now. search_box() by default is for theme,
so it should be something like this:
<?php if ($search_box): ?>
<?php print search_box("search_block_form"); ?>
<?php endif; ?>
bradlis7
Previous comments:
------------------------------------------------------------------------
Sun, 05 Mar 2006 02:26:41 +0000 : bradlis7
At http://drupal.org/node/11812, the search box does not work in the
default page.tpl.php. It should be "edit[keys]" instead of just "keys"
in the text box. This applies to 4.6 at least.
<input class="form-text" type="text" size="15" value=""
name="keys" /><input class="form-submit" type="submit" value=" <?php
print t("Search")?> " />
------------------------------------------------------------------------
Sun, 02 Apr 2006 10:09:29 +0000 : killes at www.drop.org
fixed
------------------------------------------------------------------------
Mon, 17 Apr 2006 02:24:18 +0000 : bradlis7
When I load up the page up, it still seems to be wrong. Here's the exact
text:
<input class="form-text" type="text" size="15" value="" name="keys"
/><input class="form-submit" type="submit" value="<?php print
t("Search")?>" />
But in the text field, ' name="keys" ', should be ' name="edit[keys]"
'. Sorry if I wasn't clear the first time.
------------------------------------------------------------------------
Fri, 21 Apr 2006 16:17:06 +0000 : bradlis7
Here's an easier way to do it, which is how I did it in my theme, B7.
<?php if ($search_box): ?>
<div id="search">
<?php print search_form('','',null,''); ?>
</div>
<?php endif; ?>
------------------------------------------------------------------------
Tue, 02 May 2006 22:45:14 +0000 : bradlis7
Correction: Instead of
<?php
if ($search_box):
?>
<?php
print search_form('','',null,'');
?>
<?php
endif;
?>
should be
<?php
print search_box("search_block_form");
?>
------------------------------------------------------------------------
Tue, 02 May 2006 22:47:38 +0000 : bradlis7
Sorry, due to the fact that preview doesn't work and carelessness, that
wasn't right. I'll try to make it right this time.
It should be:
<?php if ($search_box): ?>
<?php print search_box("search_block_form"); ?>
<?php endif; ?>
------------------------------------------------------------------------
Mon, 08 May 2006 02:03:10 +0000 : bradlis7
Moved to handbook issues.
More information about the documentation
mailing list