List Info

Thread: listing stories recursively




listing stories recursively
user name
2006-12-13 10:56:22
Hi all,

Is there a way I can get a list of stories from the current
category  
and recurse into the subcategories of the current category
and return  
the stories there too? So if I had a structure:

/foo
/foo/story_foo.html
/foo/bar
/foo/bar/story_bar.html
/foo/bar/baz
/foo/bar/baz/story_baz.html
...

I would get back a list that contains:
'story_foo.html', 'story_bar.html', 'story_baz.html' ...

Is this possible?

Thanks,

Adeola.
listing stories recursively
user name
2006-12-13 11:06:00
Adeola Awoyemi wrote:
> Hi all,
> 
> Is there a way I can get a list of stories from the
current category and 
> recurse into the subcategories of the current category
and return the 
> stories there too? So if I had a structure:
> 
> I would get back a list that contains:
> 'story_foo.html', 'story_bar.html', 'story_baz.html'
...
> 
> Is this possible?

Everything is possible in Bricolage 

You just add the % to the end of the parent category in your
search hash

category_uri       => "/foo/%"

and Bricolage does the rest.

Regards,

Paul
listing stories recursively
user name
2006-12-13 11:14:40
On 13 Dec 2006, at 11:06, Paul Orrock wrote:

> Adeola Awoyemi wrote:
>> Hi all,
>> Is there a way I can get a list of stories from the
current  
>> category and recurse into the subcategories of the
current  
>> category and return the stories there too? So if I
had a structure:
>> I would get back a list that contains:
>> 'story_foo.html', 'story_bar.html',
'story_baz.html' ...
>> Is this possible?
>
> Everything is possible in Bricolage 
>
> You just add the % to the end of the parent category in
your search  
> hash
>
> category_uri       => "/foo/%"
>
> and Bricolage does the rest.
>
> Regards,
>
> Paul

Cool!

I often use this in the bric interface but did not realize I
could do  
the same in templates 

Thanks Paul,

Adeola.
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )