Inside your tag definition, you could use

  tag.render('r:asset:image', tag.attr)

.. assuming you would pass the 'name' attribute to <r:my_tag>.
You could also create a hash yourself to stand in for tag.attr;

  tag.render('r:asset:image', {'name' => 'my_image'})

Could you give some more info on what you're trying to do?
I have a feeling you're overlooking a simpler solution.

Op woensdag 29 januari 2014 21:27:31 UTC+1 schreef Errol Siegel:
>
> Thanks for the reply, Jim.
>
> Currently, the parser just skips it (you end up with the <r:whatever /> 
> tag output to the browser).
>
> I'll take a look at the link you referenced.
>
> On Wednesday, January 29, 2014 12:52:25 PM UTC-6, Jim Gay wrote:
>>
>> I don't recall what happens if you have <r:something.../> in side a 
>> tag attribute; whether or not it's an error or the parser just skips 
>> it. 
>>
>> But I think the way we build tags should be rethought. 
>> They currently are just blocks of procedures, but I played with some 
>> ideas about how to make them more testable and extendable here 
>> https://gist.github.com/saturnflyer/3500369 
>>
>> Using some ideas there, and assuming the parser doesn't error on you, 
>> you might be able to set an attribute with <r:...> in it and expand 
>> that yourself inside of a tag object. 
>>
>> On Wed, Jan 29, 2014 at 1:21 PM, Errol Siegel <[email protected]> 
>> wrote: 
>> > I have written my own simple tag extension as a helper for displaying 
>> blocks 
>> > of repeating html. 
>> > 
>> > For example, let's say I have this pattern: 
>> > 
>> > <ul> 
>> > <li>first chunk of text<br /><div class="some_class">second chunk of 
>> > text</div><br /><b>third chunk of text</b></li> 
>> > <li>first chunk of text<br /><div class="some_class">second chunk of 
>> > text</div><br /><b>third chunk of text</b></li> 
>> > <li>first chunk of text<br /><div class="some_class">second chunk of 
>> > text</div><br /><b>third chunk of text</b></li> 
>> > <li>first chunk of text<br /><div class="some_class">second chunk of 
>> > text</div><br /><b>third chunk of text</b></li> 
>> > </ul> 
>> > 
>> > I realize the above markup doesn't make much sense, but it's just there 
>> to 
>> > illustrate the issue. 
>> > 
>> > Anyhow, for convenience I made my own extension that allows me to do 
>> this 
>> > instead: 
>> > 
>> > <ul> 
>> > <r:my_tag attribute1="text1" attribute2="text2">a bunch of 
>> text</r:my_tag> 
>> > <r:my_tag attribute1="text1" attribute2="text2">a bunch of 
>> text</r:my_tag> 
>> > <r:my_tag attribute1="text1" attribute2="text2">a bunch of 
>> text</r:my_tag> 
>> > <r:my_tag attribute1="text1" attribute2="text2">a bunch of 
>> text</r:my_tag> 
>> > </ul> 
>> > 
>> > This all works fine. However, I am running into the case where my 
>> markup 
>> > includes an image. I am using the asset manager extension to display 
>> images 
>> > like this: 
>> > 
>> > <r:asset:image name="my_image"/> 
>> > 
>> > The problems is this: 
>> > 
>> > Is there a way for my tag extension to use the <r:asset> tag? 
>> > 
>> > -- 
>> > 
>> > --- 
>> > You received this message because you are subscribed to the Google 
>> Groups 
>> > "Radiant CMS" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an 
>> > email to [email protected]. 
>> > For more options, visit https://groups.google.com/groups/opt_out. 
>>
>>
>>
>> -- 
>> Write intention revealing code #=> http://www.clean-ruby.com 
>>
>> Jim Gay 
>> Saturn Flyer LLC 
>> 571-403-0338 
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Radiant CMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to