在视图中以分层样式列出书籍和子书籍的最佳实践

发布于 2024-09-15 03:54:52 字数 643 浏览 1 评论 0原文

我正在开发一个有关旅行的网站。

我的需要是构建一个输出的视图:

France Guide
- Guide to Paris*
-- Hostels in Paris
- Guide to Lyon*
- Guide to Hostels in France
Ireland Guide
- Dublin*
-- Hostels in Dublin
- Cork*
Italy Guide
- Rome*
- Florence*

带有星号 * 的节点有一个位置字段,我需要在 gmap 视图中显示它们。

每个标题都应该链接到他的节点。

问题是:如何用View来表示这个层次结构?

我尝试使用图书模块,所以我有一本“指南”书,然后是“法国指南”、“意大利指南”和“爱尔兰指南”作为“指南”孩子,然后“巴黎指南”作为“法国”引导'子项,等等,但视图似乎允许列出项目父项,而不是子项。

我尝试使用分类法来构建具有相同书籍结构的词汇表......但再次陷入困境。

我有完全的自由哦,如何构建它,重要的是:

  1. 将插入内容的用户应该以简单的方式指示层次结构(书籍大纲很完美)
  2. 它必须用视图完成,因为我需要 gmap 视图,显示法国标记并在工具提示中显示所有相关指南

Im developing a website about travels.

My needs is to build a view that output:

France Guide
- Guide to Paris*
-- Hostels in Paris
- Guide to Lyon*
- Guide to Hostels in France
Ireland Guide
- Dublin*
-- Hostels in Dublin
- Cork*
Italy Guide
- Rome*
- Florence*

The nodes with the asterisk * has a location field, and i need to show them in a gmap view.

Every title should be linked to his node.

The problem is: how to represent this hierarchy with Views?

I've tried to use the book module, so i have a 'Guide' book, then 'France Guide', 'Italy Guide' and 'Ireland Guide' as 'Guide' childs, then 'Guide to Paris' as a 'France guide' child, and so on, but seem like Views allow to list the item parents, not the childs.

I've tried to use Taxonomy to, building a vocabulary with the same book structure... but stuck again.

I have the completely freedom oh how to structure this, the importants things are:

  1. Users who will insert contents should indicate the hierarchy in a simple way (the book outline is perfect)
  2. It has to be done with views, becose i need the gmap view, to show a marker on france and into the tooltip all the relative guides

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

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

发布评论

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

评论(1

|煩躁 2024-09-22 03:54:52

您可以使用分类和视图创建层次结构。查看这个问题:带节点的分类视图。我不确定表示比示例显示的更深入的内容是否容易。还四处谷歌搜索,我发现了这个模块: http://drupal.org/project/nodehierarchy 可以可能有效,尽管我从未尝试过。

You can create a hierarchy with taxonomy and views. Check out this question: Taxonomy view with nodes. I'm not sure if it would be easy to represent anything deeper than the example shows. Also googling around, I found this module: http://drupal.org/project/nodehierarchy which could possibly work, although I have never tried it.

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