首先看看我的节点设置:https://i.sstatic.net/irhpy.jpg
第一个图像是我的子页面滑块内容类型,它接受多个图像,本质上是我的幻灯片。
第二个图像是默认页面,但我添加了对子页面滑块节点的节点引用。它允许您将特定幻灯片关联到页面。
最后一张图片我在用视图和视图幻灯片搞乱,但我不知道我在做什么。我设法显示图像,但正如你所看到的,它显示了很长的垂直图像。我设置了视图幻灯片,它在多个节点之间创建一张幻灯片,而不是在一个节点中创建多个图像。
我该去哪里?
谢谢
First take a look at my node setup here: https://i.sstatic.net/irhpy.jpg
The first image is my Subpage slider content type which accepts multiple images and will essentially be my slideshow.
Second image is the default page, but I added a node reference to the Subpage slider node. It allows you to associate a particular slideshow to a page.
The last image I was messing around with Views and Views Slideshow, but I don't know what I'm doing. I managed to get images displayed, but as you can see it displays the images of a long vertically. I set the Views slideshow and it creates a slide between multiple nodes and not the multiple images in ONE node.
Where do I go from here?
Thanks
发布评论
评论(4)
要在查看页面时显示带有图像幻灯片(来自引用的节点)的块,
我想出了一种更简单(“duh”时刻)的方法来执行此操作。我在新安装的 Drupal 上创建了该功能。假设您有以下模块:CCK(启用节点引用)、视图,视图幻灯片, 文件字段, 图像字段。
field_images
)field_slide_ref
)基本设置->样式
更改为“幻灯片放映”格式:图像
,除非使用example.com/ 启用标记为“slideshow: Block”的新块admin/build/block
如果配置正确,当查看 _slide_ref_ 字段引用 slider 节点的页面时,您应该会看到块中显示的幻灯片。
旧解决方案...
要在正在查看的页面节点内部显示引用的幻灯片:
内容:YOUR_IMAGEFIELD
(从子页面滑块)重要:不要对图像进行分组,在基本设置->样式
下选择“ Slideshow”并添加Node: nid
参数,选择Provide default argument->Node ID from URL
作为参数设置允许分隔符分隔值
,然后单击“保存字段设置”现在,当您创建默认页面时,将有一个视图参考字段来选择您要使用的视图,以及一个参数字段,您可以在其中输入包含要显示的图像的节点的节点 ID作为页面中的幻灯片。
To display a block with a slideshow of images (from a referenced node) when viewing a page
I have come up with a much easier ("duh" moment) way of doing this. I created the functionality on a fresh Drupal install. Assuming you have the following modules: CCK (w/ Node Reference enabled), Views, Views Slideshow, FileField, ImageField.
field_images
)field_slide_ref
)Basic Settings->Style
to "Slideshow"Format: Image
at bottom, unless using ImageCache)example.com/admin/build/block
If configured correctly, when viewing a page with the _slide_ref_ field referencing a slider node, you should see the slideshow displayed in the block.
Old Solution...
To display a referenced slideshow inside the page node being viewed:
Content: YOUR_IMAGEFIELD
(from Subpage slider) important: don't group the images, underBasic Settings->Style
choose "Slideshow" and add an Argument ofNode: nid
choosingProvide default argument->Node ID from URL
as argument settingsAllow delimiter seperated values
and click "Save field settings"Now when you create a default page there will be a view reference field to select the view you want to use and an argument field where you can input the node id of the node with your images you want to show as a slideshow in your page.
快速解决方案:视图幻灯片文档应该采用一种非常简单的调整,以可怕的粗体哥特式书写:
如果您想从一个节点的图像字段幻灯片显示多个图像**,请不要忘记取消选中“组多个” “您的视图>字段>您的图像字段设置中的值”复选框**
THE QUICK SOLUTION: a really simple tweak which the Views Slideshow docs should put in lurid bold gothic writing:
If you want to slideshow multiple images from an image field of one node ** don't forget to untick the "Group multiple values" checkbox in the settings for your-view>Fields>your-image-field **
本节概述了如何制作从一个节点拍摄的图像的幻灯片。这里的要点是,您必须创建一个块,该块具有从 url 获取的节点 id 参数。我用它制作了一个幻灯片,在主要内容区域中显示为一个块,但您当然可以将该块放在任何地方。
模块:
CCK
图像场
观点
views_slideshow 或 jCarosel
使用图像字段创建内容类型,允许多个值。
创建一个新视图作为节点。
字段:您的图像字段。
添加参数:
对于“参数不存在时采取的操作”,选择“提供默认参数”
来自 URL 的节点 ID
在“基本设置”下选择
完毕!
本质上,它不能作为页面工作,而必须是块。幻灯片将使用 NID 来查看该节点中的图像并仅创建这些图像的幻灯片。
在 Drupal 7 中应该同样工作,但尚未对此进行测试。
This outlines how to make a slideshow of images that are taken from one node. The main point here is that you have to make a block that has an argument of node id taken from the url. I used this to make a slideshow showing as a block in the main content area, but you can of course put the block anywhere.
Modules:
CCK
imagefield
views
views_slideshow OR jCarosel
Create your Content Type with an image field, allowing multiple values.
Create a new view as a node.
Field: your image field.
Add an argument:
For 'Action to take if argument is not present', select 'Provide Default Argument'
Node ID from URL
Under 'Basic Settings' select
Done!
Essentially, this does not work as a page but has to be a block. The slideshow will use the NID to see what images are in that node and create a slideshow of those only.
Should work the same in Drupal 7 but have not tested this.
解决方案是添加“slideref field”而不是“node id”作为参数,并提供默认参数“nid by url”,然后按节点进行幻灯片放映即可。
您也可以使用视图 Nivo 滑块。
The solution is to add as argument not the 'node id' but the 'slideref field' and provide default argument 'nid by url' and the slideshow by node will work.
You can use the Views Nivo Slider as well.