Drupal:使用参数的动态视图
对于当前的项目,我需要设置一个特定的视图来显示图库详细信息页面。它应该像这样工作:
1. User clicked a node (costum-post-type: gallery)
2. User received an overview page with linked images
3. User clicked an image
4. User received the gallery page (gallerific view)
步骤 1-3 已完成。但是如何让 Drupal 使用概览页面的数据构建详细信息页面呢?
例如,如下所示:http://example.com/gallery-1/detail
或 http://example.com/gallery-2/detail
。
/gallery-n
是带有链接图像的概览页面,detail
是 /gallery-n
的详细信息页面。
希望你能明白我的意思?!
编辑
在概述页面上,我有一堆缩略图,每个缩略图都链接到详细信息库(jquery galleriffic)页面。
For a current project i need to setup a specific view to display a gallery detailpage. It should work like this:
1. User clicked a node (costum-post-type: gallery)
2. User received an overview page with linked images
3. User clicked an image
4. User received the gallery page (gallerific view)
Step 1-3 are done. But how can I get Drupal to build a detail page using the data of the overview page?
For Example something like this: http://example.com/gallery-1/detail
or http://example.com/gallery-2/detail
.
/gallery-n
is the overview page with linked images and detail
is the detailpage of /gallery-n
.
Hope you'll understand what i mean?!
EDIT
On the overview page i have a bunch of thumbails which each are linked to the detail gallery (jquery galleriffic) page.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果我正确理解你的问题,你应该做这些事情。
PS 在需要时使用关系。如果描述不清楚,请填写询问。
If I'm correct understand your problem you should do this things.
P.S. Use relationships where needed. If description is not clear, fill free to ask.
您可以在您制作的(或可能已经拥有的)自定义模块中尝试类似的操作:
您可以在菜单中设置所需页面的路径,并将其设置为调用函数的回调,然后您可以呈现您想要的任何内容,或调用您想要的任何内容。
只需将 MODULENAME 更改为您的模块名称即可。在调用views_build_view时,您可能需要做一些工作,但这应该是一个开始,如果您愿意,您可以提出更多问题,我会提供帮助。
You can try something like this, in a custom module you make (or maybe already have):
where you set the path to the page you want in the menu and set it as a callback that calls a function and then you can render whatever you want, or call whatever you want.
Just change MODULENAME with the name of your module. You might need to do some work when calling the views_build_view, but it should be a start, you can ask some more questions if you like and I'll help out.