下面是代码
<div id="block-search-form" class="block block-search contextual-links-region first last odd" role="search">
..........................
...............
</div>
Run Code Online (Sandbox Code Playgroud)
在这个区块内是搜索表单.此代码位于标题中.我想摆脱class =""中的块类,但我找不到这个模板文件.我已经搜索了几个小时,也在互联网上搜索.有人可以帮帮我吗?我也在使用Zen Theme
谢谢!!!!!
我正在尝试在Drupal站点上创建滚动图像列表.与本页底部的类似.这是Drupal的ImageCache Action的一个特性吗?如果没有,我将如何做到这一点是Drupal?
我是Drupal的新手.我从来没有使用任何框架.我用google搜索框架的定义.许多这些定义适合drupal - 我的意见.所以有人澄清了我的怀疑.drupal是一个框架与否.
提前致谢....
我试图找出如何在Drupal标准块中显示来自外部网站(在同一服务器上)的帖子.让我们说像"recent_blog_posts",但来自外部来源.
这个主题有没有教程?找不到任何.
我有一个包含几行的表,每行包含一个checknox.将在行单击事件中选中复选框.现在我如何onclick为复选框应用事件?
$('input[type=checkbox]').click(function() {
countPopChecked();
});
Run Code Online (Sandbox Code Playgroud)
这是我的剧本.单击复选框时,此功能正常.但是当我点击表格行时,我想要这个功能.
我正在尝试修改已存在的节点中的字段集合,因此我可以在3的数组中的第一个元素上更改图像.问题是,当我执行entity_load或entity_load_single时,未设置hostEntity信息,所以当我做一个:
$field_collection_item->save(true); // with or without the true
// OR
$fc_wrapper->save(true); // with or without the true
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
Exception: Unable to save a field collection item without a valid reference to a host entity. in FieldCollectionItemEntity->save()
Run Code Online (Sandbox Code Playgroud)
当我print_r字段集合实体时,hostEntity:protected字段确实是空的.我的字段集如下设置:
这是我试图用来修改现有节点字段集合的代码:
$node = getNode(1352); // Get the node I want to modify
// There can be up to 3 experts, and I want to modify the image of the first expert
$updateItem = …Run Code Online (Sandbox Code Playgroud) 如何在hook_menu_link_alter中更改自定义菜单?
我用下一个代码:
function MY_MODULE_menu_link_alter(&$item) {
// here some code
}
Run Code Online (Sandbox Code Playgroud)
此功能不适用于在管理面板中创建的菜单(/ admin/structure/menu/add).
但是正常工作到由模块admin_menu(/ admin/structure/menu/manage/management)创建的菜单.
哪里有问题?
我有一个IF/ELSE声明,我想打印一些我从Drupal网站获得的图像.我无法弄清楚如何打印这些IMG标签而不会出现错误.
这是我到目前为止:
<?php
$field = field_get_items('node', $node, 'field_visitor_image');
if($field){
<img src="<?php print image_style_url('lead_teaser', $node->field_visitor_image['und'][0]['uri']); ?>">
}
else
{
<img src="<?php print image_style_url('lead_teaser', $node->field_banner_image['und'][0]['uri']); ?>">
}
?>
Run Code Online (Sandbox Code Playgroud) 我试图覆盖块主题并使用html和twig重建它.
我似乎无法从块类型或内容类型中找到变量,并且无法找到图像URL.
我如何使用kint达到它?
在新的Drupal 8站点上,当基本页面链接在上一级菜单项下时,子菜单链接不会出现.父链接设置为显示为已展开.
drupal ×10
php ×3
drupal-7 ×2
drupal-8 ×1
feed ×1
frameworks ×1
hook ×1
html ×1
if-statement ×1
image ×1
javascript ×1
jquery ×1
menu ×1
twig ×1