gpt4 book ai didi

drupal - 无法让搜索框显示在自定义主题中

转载 作者:行者123 更新时间:2023-12-02 09:04:17 24 4
gpt4 key购买 nike

我正在尝试为 drupal 博客制作自定义主题,并且我希望搜索框出现在标题中。为此,我将以下代码放入 page.tpl.php 模板文件中:*

<?php if ($search_box): ?>
<div id="search-box"><?php print $search_box; ?></div>
<?php else: ?>
<h2>Pas de search box</h2>
<?php endif; ?>

但是该死的东西不会出现。我在谷歌上做了一些研究,并检查了 admin/build/modulesadmin/build/themes/settings/mytheme 上的搜索模块,并将搜索表单添加到admin/build/block/list/mytheme 中的 header 。我是否错过了什么,或者我做错了什么?因为它仍然不起作用,并且开始让我生气......

谢谢。
来自法国的问候;)

最佳答案

来自:http://drupal.org/handbook/modules/search

If both the search module and the menu module are enabled, from the menus page (administer >> menus) you can enable on the Navigation Menu the item Search. The option to show this menu item may be disabled by default, but you can enable it. (And you can rename "Search" to whatever you wish.)

You can also place a link to Search among your site's primary and secondary links, or on any other menu as well. (Click "add menu item," and when you fill in the "path" field on the dialogue page just enter "search.")

On your blocks page (administer >> site building >> blocks in Drupal 6, and administer >> structure >> blocks in Drupal 7) there's also a Search form you can enable, and you can choose where you want it to display.

On your permissions page (administer >> user management >> permissions in Drupal 6, or People >> Permissions in Drupal 7) you can decide who can do searches and who can administer the search settings. By default, anonymous users cannot perform searches.

A technical note: To use the search module the database user needs the create temporary table permission. If you seem not to have it, ask your systems administrator to make sure it's granted to you.

关于drupal - 无法让搜索框显示在自定义主题中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3441285/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com