将 Ubercart 视图附加到相关内容时出现问题

发布于 2024-08-23 12:40:57 字数 729 浏览 6 评论 0原文

示例页面: http://giantcalculator.com/content/cartridge-filters

非常麻烦将 ubercart 视图连接到相关内容页面。在上面的示例中,我已将视图附加到底部;您可以向下滚动查看它。这是一个乏味的过程,其中我必须创建视图,然后创建一个迷你面板,将视图包含在迷你面板中,然后转到块页面并将迷你面板添加到区域(当前是主要内容下方的区域) ,然后我必须配置该块,以便视图仅出现在它的一个特定页面上。

这看起来太复杂了,特定区域很快就会有大约 20 个块,尽管每个块只出现在一页上。是否有更好的方法将视图附加到其相关内容信息,反之亦然?

我知道视图会创建自己的页面,如果我可以在视图之上添加内容,那就太好了。或者在视图本身中,可以以某种方式添加内容吗?

我几乎准备好继续这个网站了,但我真的需要首先找到是否有更好的方法。我将其发布在多个地方,并通过 PayPal 向第一响应者提供 20 美元的赏金,并提供我最终使用的最佳替代方案。 (如果有的话)。如果两个或更多人在不同的论坛上有相同的回复,并且我不知道谁是第一个,则可以共享赏金,但当我确实有答案时,我会立即发布它。

本次发布的其他论坛包括 Drupal.org 付费论坛、Ubercart Bounty 论坛、aardvark、superuser 和 stackoverflow。

Example page: http://giantcalculator.com/content/cartridge-filters

It’s very cumbersome to connect the ubercart view to a relevant content page. In the example above I have attached the view to the bottom; you can scroll down to see it. It is a tedius process though in which I have to create the view, then create a mini panel, include the view in the mini panel, then go to blocks page and add the mini panel to region (currently a region below the main content), then I have to configure the block so the view only appears on it’s one particular page.

This seems far too complicated and the particular region will soon have about 20 blocks inside it, though each only appearing on one page. Is there a better way to attach a view to its relevant content info, or vice versa?

I know the view creates a page of its own, and if I could add the content on top of the view that would be great. Or within the view itself, can the content be added somehow?

I'm almost ready to move forward with this site but I really need to find if there is a better method first. I'm posting this in a number of places and offering a $20 bounty via paypal to the first responder with best alternative that I end up using. (if there is one). Bounty may be shared if two or more people have the same response on different forums and I can't tell who was first, though when I do have an answer I'll promptly post it.

Other forums this will post include Drupal.org paid forum, Ubercart Bounty forum, aardvark, superuser and stackoverflow.

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

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

发布评论

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

评论(1

山色无中 2024-08-30 12:40:57

如果我理解正确的话,我认为您缺少的难题是视图参数。如果您发现自己创建了多个视图,其中唯一的区别是内容(即基于分类法或某个 CCK 字段),您可能希望将其用作视图中的参数,以便加载正确的内容自动地。

我假设“滤筒过滤器”是一个分类术语,上面链接的页面是应用该术语的节点。因此,您需要在视图管理中的视图中添加一个分类参数,并让它从当前节点中提取术语。有很多关于这方面的教程,这里有一个截屏视频:http://gotdrupal。 com/videos/drupal-views-arguments

我也不确定您为什么使用迷你面板。它们通常用于重复显示的块集或其他内容,例如选项卡式块或页脚。听起来您只想要上述视图的常规块显示。您还可以将整个页面设为面板。

If I understand correctly, I think the piece of the puzzle you're missing is Views arguments. If you ever find yourself creating more than one view, where the only difference is the content (ie. based on taxonomy, or a certain CCK field), you probably want to use that as an argument in the view so it loads the correct content automatically.

I assume "cartridge filters" is a taxonomy term, and the page linked above is a node with this term applied. So you'd add a taxonomy arg to your view in the Views admin, and get it to pull the term from the current node. There are a bunch of tutorials out there on this, and here's a screencast: http://gotdrupal.com/videos/drupal-views-arguments

I'm also not sure why you're using mini panels. They're generally used for sets of blocks or other content to be displayed repeatedly, like a tabbed block or footer. It sounds like you just want a regular block display of the aforementioned view. You could also make this entire page a Panel.

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