[PHPTAL] RSS Feed <link> attribute
Nick Pack
nick at carbidefinger.net
Tue Feb 26 10:35:45 CET 2008
That easy eh? Thanks so much Laurent!
-----Original Message-----
From: phptal-bounces at lists.motion-twin.com
[mailto:phptal-bounces at lists.motion-twin.com] On Behalf Of Laurent
Bedubourg
Sent: 26 February 2008 09:38
To: Template Attribute Language for PHP
Subject: Re: [PHPTAL] RSS Feed <link> attribute
Nick Pack wrote:
> I've built a template/associated code for generating an RSS feed from
a
> recordset, im having some trouble with the link attribute and I
wondered
> if anyone could shed some light on a workaround.
>
>
>
> In my template I have tried both:
>
>
>
> <link><span tal:content="article/articlelink"
> tal:omit-tag="">http://www.carbidefinger.net/</span></link
> <http://www.carbidefinger.net/%3c/span%3e%3c/link>>
>
> <link
> tal:content="article/articlelink">http://www.carbidefinger.net</link
> <http://www.carbidefinger.net%3c/link>>
>
>
>
> Both methods result in the following output after the template is
parsed
> (The dataset definitely contains article/articelink as the same
function
> is used with a different template for xhtml output):
>
> <link/>
>
>
Hello Nick,
PHPTAL is by default configured to output XHTML and try to clean up
empty elements like LINK.
To modify this behaviour, You just have to add
$tpl->setOutputMode(PHPTAL::XML);
before executing your template and PHPTAL will treat it as a regular XML
document and won't modify your elements.
Best regards,
--
Laurent Bedubourg
lbedubourg at motion-twin.com
http://www.motion-twin.com
_______________________________________________
PHPTAL mailing list
PHPTAL at lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal
More information about the PHPTAL
mailing list