在视图中以分层样式列出书籍和子书籍的最佳实践
我正在开发一个有关旅行的网站。
我的需要是构建一个输出的视图:
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来表示这个层次结构?
我尝试使用图书模块,所以我有一本“指南”书,然后是“法国指南”、“意大利指南”和“爱尔兰指南”作为“指南”孩子,然后“巴黎指南”作为“法国”引导'子项,等等,但视图似乎允许列出项目父项,而不是子项。
我尝试使用分类法来构建具有相同书籍结构的词汇表......但再次陷入困境。
我有完全的自由哦,如何构建它,重要的是:
- 将插入内容的用户应该以简单的方式指示层次结构(书籍大纲很完美)
- 它必须用视图完成,因为我需要 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:
- Users who will insert contents should indicate the hierarchy in a simple way (the book outline is perfect)
- 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用分类和视图创建层次结构。查看这个问题:带节点的分类视图。我不确定表示比示例显示的更深入的内容是否容易。还四处谷歌搜索,我发现了这个模块: 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.