简体   繁体   English

在drupal 7中隐藏Webform标题

[英]Hide Webform Title in drupal 7

I have a Webform with various fields. 我有一个包含各种领域的Webform。 At the time of display, title of the webform also displayed. 在显示时,还显示webform的标题。 I want to avoid that title. 我想避开那个头衔。 Is it possible to hide the title? 是否可以隐藏标题? Please help me... 请帮我...

This is the webform I created. 这是我创建的webform。 I want to hide the title 'Contact Form' 我想隐藏标题'联系表'

在此输入图像描述

If the title is coming from the node title then you can use http://drupal.org/project/auto_nodetitle module to disable the page title. 如果标题来自节点标题,那么您可以使用http://drupal.org/project/auto_nodetitle模块来禁用页面标题。

You can find the settings under the content type settings. 您可以在内容类型设置下找到设置。 Do not that the settings you apply will be content type level. 请注意,您应用的设置不是内容类型级别。 So titles of all the content for the particular content type will be hidden. 因此,将隐藏特定内容类型的所有内容的标题。

If you are using webform (D7), then you can hide title of webform (eg Contact Form) by going to Block -> Configure the Block -> type <none> in " block title " text box and Save it. 如果您正在使用webform(D7),那么您可以通过转到阻止 - > 配置阻止 - <none>在“ 块标题 ”文本框中键入<none>并保存它来隐藏webform的标题(例如联系表单)。 See the screen shots below: 请参见下面的屏幕截图: 在此输入图像描述

Probably couldn't devise a worse way of doing it but in region--content.tpl.php I changed 可能无法设计一种更糟糕的方法,但在区域内 - content.tpl.php我改变了

<?php print $title; ?>

to

<?php if ($title!="Contact"){ print $title; }?>

.. it does work ..它确实有效

My solution to a theme called "myTheme": 我对一个名为“myTheme”主题的解决方案:

In myTheme/template.php add: 在myTheme / template.php中添加:

function myTheme_form_alter( &$form, &$form_state,$form_id ){
    if (isset($form['#node']->title)){
        $form['#node']->title = false;
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM