プロジェクト

全般

プロフィール

Vote #63936

完了

Extend child pages macro to display child pages based on page parameter

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2008/09/30
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
2
issue_org_id:
1975
author_id:
2256
assigned_to_id:
0
comments:
4
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

A feature I would like to see is a macro that would create a list of child pages based on an input of a page for table of contents/index purposes.

Example:
ParentA has 3 Child pages, ChildA,ChildB,ChildC.

Current: child_pages displays the child pages of the current page in a list.
Proposed: child_pages(ParentA) displays the child pages of the page ParentA in a list. (retain default behavior with no param)

  • ParentA ** ChildA ** ChildB ** ChildC

Real World Example:
This way someone can easily add a list of pages concerning a topic.

  • Servers ** Web Server ** Mail Server
  • Printers ** Upstairs Printer ** Downstairs Printer

journals

I added a patch #2174 witch (hopefully :)) solves this request.
--------------------------------------------------------------------------------
Feature added in r2053. Implementation is slightly different than your patch.
By default, the link to the parent is not displayed (so that it works just like when calling the macro without parameter). But an option is added to do so.

Examples:

<pre>
child_pages(Foo) # => diplays child pages only
child_pages(Foo, parent=1) # => diplays a link to Foo and its child pages
</pre>

@WikiHelper#render_page_hierarchy@ method is moved to @ApplicationHelper@ so that this macro can be called from anywhere (not only from wiki pages) by giving the page title. Some tests are also added.
--------------------------------------------------------------------------------

Update !{{macro_list}} to document this new feature otherwise is hard to discover

--------------------------------------------------------------------------------
Update !{{macro_list}} to document this new feature otherwise it is hard to discover
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン0.8_2 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0