iterating over children of children in order of creation

View: New views
3 Messages — Rating Filter:   Alert me  

iterating over children of children in order of creation

by Joe Van Dyk-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I've got the following structure:

/publications
/publications/boats/page1
/publications/boats/page2
/publications/boats/page3
/publications/cars/page1
/publications/cars/page2
etc

I want to make a RSS feed that lists the most recent pages from the
publications directory.

when I do something like:

<r:find "/publications" />
<r:children:each by="created_at" order="desc" limit="20">
...
</r:children:each>

It seems to order the pages by whenever the top-level boats and cars
pages themselves were updated, not by the most recent updated children
of the cars and boats pages.

Again, if /publications/cars/page5 was added, I'd want that to be at
the top of the rss feed.

Ideas on how to do that?



--
Joe Van Dyk
http://fixieconsulting.com
_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: iterating over children of children in order of creation

by john muhl-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

take a look at the aggregation extension:
http://github.com/radiant/radiant-aggregation-extension

On Thu, Nov 5, 2009 at 7:45 PM, Joe Van Dyk <joe@...> wrote:

> Hello,
>
> I've got the following structure:
>
> /publications
> /publications/boats/page1
> /publications/boats/page2
> /publications/boats/page3
> /publications/cars/page1
> /publications/cars/page2
> etc
>
> I want to make a RSS feed that lists the most recent pages from the
> publications directory.
>
> when I do something like:
>
> <r:find "/publications" />
> <r:children:each by="created_at" order="desc" limit="20">
> ...
> </r:children:each>
>
> It seems to order the pages by whenever the top-level boats and cars
> pages themselves were updated, not by the most recent updated children
> of the cars and boats pages.
>
> Again, if /publications/cars/page5 was added, I'd want that to be at
> the top of the rss feed.
>
> Ideas on how to do that?
>
>
>
> --
> Joe Van Dyk
> http://fixieconsulting.com
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Re: iterating over children of children in order of creation

by Joe Van Dyk-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks.

I have about 100 directories that I'm loading pages from -- would i
have to list each subdirectory?

Joe

On Thu, Nov 5, 2009 at 8:32 PM, john muhl <johnmuhl@...> wrote:

> take a look at the aggregation extension:
> http://github.com/radiant/radiant-aggregation-extension
>
> On Thu, Nov 5, 2009 at 7:45 PM, Joe Van Dyk <joe@...> wrote:
>> Hello,
>>
>> I've got the following structure:
>>
>> /publications
>> /publications/boats/page1
>> /publications/boats/page2
>> /publications/boats/page3
>> /publications/cars/page1
>> /publications/cars/page2
>> etc
>>
>> I want to make a RSS feed that lists the most recent pages from the
>> publications directory.
>>
>> when I do something like:
>>
>> <r:find "/publications" />
>> <r:children:each by="created_at" order="desc" limit="20">
>> ...
>> </r:children:each>
>>
>> It seems to order the pages by whenever the top-level boats and cars
>> pages themselves were updated, not by the most recent updated children
>> of the cars and boats pages.
>>
>> Again, if /publications/cars/page5 was added, I'd want that to be at
>> the top of the rss feed.
>>
>> Ideas on how to do that?
>>
>>
>>
>> --
>> Joe Van Dyk
>> http://fixieconsulting.com
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@...
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@...
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



--
Joe Van Dyk
http://fixieconsulting.com
_______________________________________________
Radiant mailing list
Post:   Radiant@...
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant