简体   繁体   English

在Drupal中将基本页面优雅地添加为子页面

[英]Elegantly adding basic pages as sub-pages in Drupal

I have a main page (let's call it "GROUP") accessible from a site-wide navigation bar. 我有一个可从站点范围的导航栏访问的主页(我们称其为“ GROUP”)。 I've created other sub-pages ("SUB1" through "SUBn") and set their Parent item to "GROUP" in the Edit Basic page panel, but am at a loss as to how I can get each such SUBn to show up on the GROUP page. 我已经创建了其他子页面(“ SUB1”至“ SUBn”),并将其父Parent item设置为“ Edit Basic page面板中的“组”,但是对于如何获取每个这样的SUBn却感到困惑在“组”页面上。

I could simply create a <ul> of permalinks to the SUBn's, but that seems a bit inelegant and inflexible. 我可以简单地创建一个<ul>到SUBn的永久链接,但这似乎有点不灵活。 Is there a native Drupal way of doing this? 有原生的Drupal方法吗?

Add GROUP to a menu (usually Primary Links for a small site), then add SUB1...SUBn as subpages on the menu, so you have an arrangement like: 将GROUP添加到菜单(通常是小型站点的Primary Links),然后将SUB1 ... SUBn添加为菜单上的子页面,因此您的排列方式如下:

  • Home
  • GROUP
    • SUB1 SUB1
    • ... ...
    • SUBn SUBn
  • Contact Us 联系我们
  • Etc 等等

Then use Menu Block from http://drupal.org/project/menu_block to create a block that shows entries at the first level and have the block show up on the pages where you want the subpage list to appear. 然后使用http://drupal.org/project/menu_block中的菜单块创建一个块,该块显示第一级的条目,并使该块显示在您希望显示子页面列表的页面上。

您也可以使用“ 骨骼”模块自动执行节点/菜单结构的创建。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM