I wrote up this very issue just yesterday for the Summer Reboot. It is the
final section on this page here:

http://wiki.radiantcms.org/Using_the_built-in_tags

The answer is that Radius cannot parse "tags-within-tags". Not even when the
> outer tag is a standard HTML tag, and not a Radius tag.


Actually, I think you can do the following (contrived example, I know!):

    <a href="<r:url/>"><r:title/></a>

As Tony pointed out, this is invalid XML. But Radiant would parse the
<r:url/> tag, replacing it with a string, so that in the output page, the
illegal portion of XML would be gone.

Please do correct me if I am wrong. I haven't had time to test this
particular example since I wrote the article, but I am fairly sure that I
have used Radius tags within the attributes of HTML tags without a problem.

Drew



> I usually end up writing custom tags in cases like this, but perhaps
> someone has a more efficient solution?
>
> Cheers,
> Casper
>
>
>
> On 29/08/2008, at 10:44, Tony Spataro wrote:
>
>  Hello all,
>>
>> Sorry if this is a newbie-ish question; I've checked the FAQ and skimmed
>> the
>> source a bit, and haven't found any obvious solution.
>>
>> I'm in a position where I want to evaluate a Radius tag and insert the
>> resulting text into the value of an HTML attribute. My use case involves
>> the
>> page_attachments extension, and I'm trying to do something like this:
>>
>> <r:attachment:link title="<r:attachment:author />"> Click here
>> </r:attachment:link>
>>
>> Which is to say, I want the title of the link to be the attachment
>> author's
>> name. However, this is not well-formed XML, and anyhow the Radius parser
>> doesn't seem to parse into attribute values.
>>
>> Is there a canonical way to do what I want? I'm aware that I could simply
>> tweak page_attachments_tags to do things my way, but that feels like
>> cheating to me...
>>
>> Cheers,
>>  -Tony
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant@radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to