Project

General

Profile

page title instead of page name in {{child_pages}}

Added by cera wulii about 14 years ago

Hi,

Is there a way to get the page titles instead of the page names when using the

Error executing the child_pages macro (With no argument, this macro can be called from wiki pages only)
macro?

Context: I'm trying to trick child_pages to get it to order the child pages in a way I'd like (not necessarily the alphabetic order): my idea was to rename the child pages with a number as the first character to override the alphabetic order:

Foo
- 1getting_started
- 2zzdoc
- 3abcdoc

This works, but it would be nicer to get the page title displayed instead of the page name when using

Error executing the child_pages macro (Page not found)
, so that the internal reordering trick does not appear in the rendering...

Foo
- Getting started
- My zz doc
- My abc doc

Thanks


Replies (4)

RE: page title instead of page name in {{child_pages}} - Added by Felix Schäfer about 14 years ago

Not directly possible as redmine has no notion of a "page title".

RE: page title instead of page name in {{child_pages}} - Added by cera wulii about 14 years ago

Ok, thanks. Is there a way to create a small macro to dynamically go fetch the 'h1.' contents of a page, which would then feed the child_page macro? I'm new to ruby (though i'm willing to learn), so I don't know if this is something reasonable, or rather complex to set up.

Of course, I could bypass the child_page macro, and hardcode things as I want, but I hate it...

Thanks

RE: page title instead of page name in {{child_pages}} - Added by Felix Schäfer about 14 years ago

It probably is possible, I don't know that part of redmine good enough to give you a good answer to that though.

RE: page title instead of page name in {{child_pages}} - Added by Cláudio Miranda over 7 years ago

Does it still with no solution?

I have the same problem.

I created a page like

 [[RealNamePage|AliasPageName]] 
and when I use the child page macro it returns the real name.
Is there a way to this macro unless shows the comment description page ?

Thaks.

    (1-4/4)