Re: [Radiant] any way to dynamically populate r:random?

2008-06-10 Thread john muhl
I have to admit that rspec is still a bit intimidating, so I'm not sure this is exactly the sort of spec you were looking for. Feel free to point out everything that's wrong here and I'll try again. === --- standard_tags_spec.rb +++ standard_tags_spec.rb @@ -383,6 +383,13 @@ it 'r:random

Re: [Radiant] any way to dynamically populate r:random?

2008-06-07 Thread Andrew Neil
On 6 Jun 2008, at 01:01, john muhl wrote: I'd like to insert part of a random subpage into the sidebar and figured it'd be a good fit for the r:random tag but so far am having very little luck. I've tried: r:random r:children:each r:optionr:title//r:option /r:children:each /r:random

Re: [Radiant] any way to dynamically populate r:random?

2008-06-07 Thread Sean Cribbs
This one has always been a mystery to me, however I believe it has to do with tag blocks versus expands. I imagine, however, we could produce a failing spec to demonstrate what is unexpected about the behavior. Any takers? Sean john muhl wrote: On 2008/06/07, at 16:49, Andrew Neil wrote:

Re: [Radiant] any way to dynamically populate r:random?

2008-06-07 Thread Sean Cribbs
Actually, I just answered my own question. We should really be rendering the contents of r:option at each pass, rather than passing the block back. The reason is that local context (tag.locals) will be potentially lost when you render the block after selecting the option. However, a spec

Re: [Radiant] any way to dynamically populate r:random?

2008-06-07 Thread john muhl
I guess Sunday is as good a day as any to get to know rspec. Unless someone beats me to it I send a pull request when I think I have something useful. On 2008/06/07, at 20:35, Sean Cribbs wrote: Actually, I just answered my own question. We should really be rendering the contents of

[Radiant] any way to dynamically populate r:random?

2008-06-05 Thread john muhl
I'd like to insert part of a random subpage into the sidebar and figured it'd be a good fit for the r:random tag but so far am having very little luck. I've tried: r:random r:children:each r:optionr:title//r:option /r:children:each /r:random and even: r:random r:find