问题标签 [drupal-7]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
4 回答
416 浏览

drupal - Drupal 站点中的管理区域

我对 Drupal 有一个问题:我构建的站点有一个只有站点管理员可以访问的保护区。我想创建一个可以访问受保护区域的伪管理员角色,但我不希望他们访问完整的管理员/Drupal 功能。

在这种情况下,最好的做法是什么?我可以创建一个仅对某些区域(如创建内容和其他)具有样式访问权限的子管理区域,而无需重新发明轮子吗?

0 投票
3 回答
4156 浏览

php - 如何解决此警告:file_get_contents(): Unable to find the wrapper "public"?

我需要从下载的文件中读取一些元信息。但我不知道该怎么做。

这是我的代码:

此代码导致此警告:

警告:file_get_contents():无法找到“公共”包装器 - 您在配置 PHP 时是否忘记启用它?

知道我做错了什么吗?

0 投票
1 回答
5871 浏览

drupal - Drupal:url_rewrite 中的 hook_url_inbound_alter:重写 URL 的查询部分以进行分页

我正在尝试使用 url_rewrite 来解决paging模块 URL 中的非友好参数。我希望将 URLpage-title.html?page=0,1转换为page-title/page1.html.

这是我的钩子:

是不是不能在 hook_url_inbound_alter 中添加查询部分?

  • 如果我注释掉 mymod_url_outbound_alter,它可以工作,机器人逗号我们 URL 编码 - 好的,它确实显示了友好的 URL。
  • 如果我同时启用两者,页面将进入无限重定向 301 循环。
  • 注释掉的变体似乎也不起作用。

是的,我知道最好修复paging使用非查询 URL。但是该模块有点过于复杂,无法可靠地做到这一点。pagination模块对我来说缺少功能。

是 URL 更改的问题吗?我该怎么做才能让它发挥作用?

0 投票
4 回答
7818 浏览

drupal - How do I add taxonomy terms using Drupal Migrate

I'm using the migrate module to copy data from several sources to a new drupal installation. So far, I'm able to replicate a lot of what I need from the examples provided with the module. I'm currently stuck on adding terms or taxonomy to newly created nodes. The example shows:

I've tracked down the migrate_example_beer_styles destination mapping and it seems to be the machine name for that taxonomy.

I've tried imitating this behavior with every variation of what my machine_name should be, but the terms never seem to get associated:

By id:

And, by name:

Am I wrong assuming the destination mapping is the machine name for a taxonomy?

This version of the migrate module was released recently, I haven't found any other helpful examples on the web.

0 投票
2 回答
971 浏览

templates - Drupal 7 Theming VS Drupal 6 有哪些变化?

我听说 Drupal 7 主题已被简化,但在互联网上找不到太多关于它的资源。

我特别有兴趣了解哪些变化可以提高用户的生产力和效率。

既然 D7 正式推出,肯定会有更多的人开始问这个问题,所以这是一个很好的地方来巩固我们如何有效和高效地主题化 D7 的知识。

谢谢!

0 投票
3 回答
4997 浏览

drupal - Drupal 7 中的视图。对多个值进行分组。他们在哪里?

Drupal 6 中的示例http://easycaptures.com/fs/uploaded/307/9486641711.png

我需要它只显示一张第一张图片。或从第二个开始查看所有内容。

0 投票
5 回答
4485 浏览

drupal - 如何获取模块目录中图像的 URL?

在包含自定义模块的目录中,我有一个包含图像的目录。

如何获取这些图像的 URL?

0 投票
3 回答
6596 浏览

drupal - Drupal 7:如何创建键/值字段(或字段组,如果可能的话)?

假设我正在创建一些应用程序文档。在为函数创建内容类型时,我有一个用于名称的文本字段、一个用于一般描述的框以及一些其他基本内容。现在我需要一些东西来存储函数的参数。理想情况下,我想将这些作为键值对或两个相关字段输入,然后可以根据给定函数的需要重复多次。但我找不到任何方法来实现这一点。

我得到的最接近的是一个废弃的字段多组模块,它说要等待 CCK3,据我所知,它甚至还没有产生 alpha,其项目页面没有明显提到这种多组功能。我还检查了 CCK 问题队列,我认为我也没有在其中看到它。

我没有看到当前可行的方法吗Viable 包括“你以错误的方式思考这个问题,而是做 X”。我考虑过使用“长文本和摘要”字段,但是这闻起来有点骇人听闻,我不知道我是否会为自己设置副作用。我是 Drupal 的新手。

0 投票
1 回答
993 浏览

drupal - Drupal 分类流行列表

Drupal 7 中有大约 70 种分类法。我想获得最流行(最常用)的列表 20,从最流行到最少放置在块中。

是否有具有此功能的模块,或者您将如何完成它。

0 投票
3 回答
5527 浏览

drupal - 如何将当前节点分类的主体类添加到 Drupal 7 主题

有谁知道如何或可以指导我如何为当前节点的分类术语添加 body css 类?即<body class="term-dogs">“狗”是分类术语名称。它也可能只是术语 ID。无论哪种方式都很好,我只需要一个解决方案。这将用于 Drupal 7 zen 子主题