[Radiant] Processing unrelated nested Radius tags
Sean Cribbs
seancribbs at gmail.com
Sat Jan 19 17:22:13 CST 2008
David Piehler wrote:
> John Long wrote:
>
>> On 1/16/08, David Piehler <davidpiehler at gmail.com> wrote:
>>
>>> <r:attachment:image name="<r:photo><r:photo:name /></r:photo>" alt="photograph" />
>>>
>> This fails because Radius can't parse tags that are within attributes.
>> Why are you trying to do this? Is there a way to accomplish what you
>> want without using tags within attributes.
>>
>
> My goal was to have a person's name in the DB generate a filename that I
> could pass to the page_attachments tag to grab. Example:
>
> David Piehler -> david_piehler.jpg -> <r:attachment:image
> name="david_piehler.jpg" />
>
> As you've said though, something like this is not possible due to the
> way Radius tags are parsed. Thanks for clarifying this. I've since taken
> a more heavy-handed approach to solve it.
>
David,
The way I've found to do this is to use nested Radius tags that pass
information back up to the parent. However, the page_attachments tags
are currently not structured to support this. If they were, it might
look like this:
<r:attachment:image><r:name>david_piehler.jpg</r:name></r:attachment:image>
Obviously, you would use some of your own tags to generate the name.
Sean
More information about the Radiant
mailing list