将多个图像附加到分类术语

发布于 2024-08-12 18:53:51 字数 70 浏览 5 评论 0原文

我已经安装了“分类图像”模块。 但我找不到一种方法将多个图像附加到一个分类术语

我的 drupal 版本是 6

I have installed "Taxonomy Image" module.
but i can not find a way to attach multiple images to one taxonomy term

my drupal version is 6

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梦忆晨望 2024-08-19 18:53:51

作为 Henrik 回答的旁注,无需编写一行代码即可实现您想要的内容的另一种方法可能是:

  1. 为分类法的每个术语创建“图像节点”。
  2. 将每个图像节点与分类法的正确术语相关联(这就是有趣的地方:您可以为每个术语创建多个图像节点,也可以对不同的术语使用相同的图像节点)。
  3. 创建一个 wiew ,它将分类术语/术语作为参数,并显示用该术语标记的所有图像节点。

如果您已经了解视图模块,您可能会意识到它有多么简单。如果您是 Drupal 的新手并且还不了解,那么我建议您一起仔细看一下与 CCK 相比:它们很大,需要一些时间来“理解”(也不是那么多,虽然!)但是你花在研究它们上的每一秒都是值得的!

使用视图还为您提供了很大的灵活性,因为您可以轻松地将输出主题化在表格、列表、网格中,添加或删除关联字段,甚至添加额外的过滤器或将它们在单独的块中公开给用户......

HTH!

As a side note to what Henrik answered, an alternate way to implement what you want without having to code a single line could be:

  1. Create "image nodes" for each term of your taxonomy.
  2. Associate each image node to the right term of the taxonomy (here's where it get interesting: you can create more than one image node per term and can also use the same image node for different terms).
  3. Create a wiew that takes as arguments the taxonomy term/terms and show all the image nodes tagged with that term.

If you already know the views module you probably realise how easy it is. If you are new to Drupal and do not know it yet, then I recommend you take a close look at it together with the CCK one: they are big and require some time to be "grokked" (neither so much, though!) but every second you spend studying them is worth it!

Using views also gives you a lot of flexibility as you can theme easily theme your output in tables, lists, grids, add or remove associated fields, and even put extra filters or expose them to the user in separate blocks...

HTH!

风苍溪 2024-08-19 18:53:51

据我所知,该模块不提供将多个图像附加到一个术语的选项。从项目页面上的功能列表

  • 允许一对一的术语与图像关系。
  • 允许多对一的术语与图像关系。

因此,一个术语可以完全具有图像,或者多个术语可以具有相同的图像(用于父术语图像的“继承”),但没有“每个术语多个图像”选项。

不过,我还没有深入研究模块代码来看看是否有一种简单的方法可以改变这一点。到目前为止,似乎也没有对此功能的请求

As far as I can see, the module does not provide the option to attach multiple images to one term. From the features list on the project page:

  • Allows one-to-one term-to-image relationships.
  • Allows many-to-one term-to-image relationships.

So one term can have exactly on image, or multiple terms can have the same image (for 'inheritance' of a parent term image), but no 'multiple images per term' option.

I have not delved into the modules code to look if there is an easy way to change this, though. So far, there seems to be no request for this feature either.

忆梦 2024-08-19 18:53:51

最简单的方法是首先安装以下模块:

启用这两个模块后。进入管理>>结构>>查看和编辑管理:文件视图。添加所需的分类字段。

返回管理>>内容>>文件,您将看到现在的操作,选择更改值和您希望具有相同分类术语的所需图像。点击执行>>您的分类领域。选择一个或多个术语,然后单击下一步。就是这样。

The easiest way is to first install the following modules:

After enabling both modules. Go to Admin >> Structure >> Views and edit the Administration: Files view. Add the desired taxonomy field.

Go back to the Administration >> Content >> File and there you`ll see now operations, select change value and the desired images you wish to have the same taxonomy term. Click Execute >> Your taxonomy field. Select the term or terms and click next. That is it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文