如何在drupal 7中显示除当前页面之外的兄弟页面? [英] How to display sibling pages except current page in drupal 7?

查看:8
本文介绍了如何在drupal 7中显示除当前页面之外的兄弟页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有父页面 A1 和 B1.A1 有子页面 A1.1、A1.2、A1.3,B1 有子页面 B1.1、B1.2.

Suppose I have parent pages A1 and B1. A1 has child pages A1.1, A1.2,A1.3 and B1 has child pages B1.1, B1.2.

当我在页面 A1.1 上时,我将能够显示 A1.2 和 A1.3.A1.2 一样,我应该能看到 A1.1 和 A1.3.

When I am on page A1.1 I shall be able to display A1.2 and A1.3. Same for A1.2, I shall be able to see A1.1 and A1.3.

如果我在 B1.1 页,我将看到 B1.2,反之亦然.

If I am on page B1.1, I shall see B1.2 and vice versa.

注意:每个页面都有一个图像和一个标题.我想使用视图获得解决方案.

Note: Every page has an image and a title. I want to get a solution using views.

如果我们需要子页面,这个线程可以链接到这个链接:如何在drupal 7中列出当前父页面的所有子页面?

This thread may be linked to this link if we need the child pages: How to list all child pages of current parent page in drupal 7?

推荐答案

在两个页面上添加上下文过滤器nid,默认从url中选择内容id,然后在下面提前部分检查排除选项.

Add a contextual filter nid on both pages, in default select content id from url, then down below in advance section check exclude option.

这篇关于如何在drupal 7中显示除当前页面之外的兄弟页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆