Sorting order

When using such code as



I can specify order=“asc” or order=“desc” but what if I want an
arbitrary order? In the admin section, pages are ordered according to
what I guess is the order of creation (page ID). I can not change the
order itself (which would solve my problem).

Any idea?

Ollivier, full of questions today

On 9/1/06, Ollivier R. [email protected] wrote:

When using such code as



Make that


<r:children:each order=“desc”>
<r:content />


-----

Sorry.

Ollivier,

You can specify by=“attribute” on the children:each tag, which lets you
pick
the attribute to sort by, which I’m assuming are any attributes of the
Page
model.

Sean C.
seancribbs.com

On 9/1/06, Sean C. [email protected] wrote:

You can specify by=“attribute” on the children:each tag, which lets you pick
the attribute to sort by, which I’m assuming are any attributes of the Page
model.

Found that by looking at the code but…

I’m now getting repeatable ruby/mongrel crashes while rendering my
pages. Only the “test” one but instant mongrel death with

zsh: illegal hardware
instruction (core dumped) mongrel_rails start -e
production -B

I tried to put 1, 2, … in the “slug” attribute in the subpages and
by=“slug” in the parent one.

it is like that:

test (slug=“test”)
|
±— FreeBSD (slug=“2”, title=“FreeBSD …”)
| ----- body
| ----- left
| ----- main
|
±— Programs (slug=“1”, title=“Programs…”)
----- body
----- left
----- main

test is only

<r:children:each by=“slug” order=“asc”>
<r:content />


-----

while body is

-----

Any idea? Running on FreeBSD 6.1-RC1 on a D820 (dual core) system
with Ruby 1.8.5 and mongrel 0.3.14.3.

On 9/1/06, Ollivier R. [email protected] wrote:

I’m now getting repeatable ruby/mongrel crashes while rendering my
pages. Only the “test” one but instant mongrel death with

zsh: illegal hardware
instruction (core dumped) mongrel_rails start -e production -B

With Ruby 1.8.4 on OS X but with the same 0.3.13.4 mongrel, it doesn’t
crash like that but seems to recurse too deep because I get a message
about that.

Any idea, should I revert to previous Ruby and/or mongrel?

To those interested, I’ve found a solution after being hit on the head
one time too much by the sentence “if the body page part is not found
here, radiant will try to find it in the parent”…

It seems also to “fix” the ruby calls stack overflow caused by the way
I did the thing before.

I now have a “parent page” with only this:


<r:children:each by=“slug” order=“asc”>


-----

and all child pages have only “left” and “main” page parts, no “body”.
And the by=“slug” allows me to the way I want it.

Happy.