[PHPTAL] Silly thing... but how do I do it?!
Kornel Lesiński
kornel at aardvarkmedia.co.uk
Fri May 15 15:09:53 CEST 2009
On 15-05-2009 at 13:46:45 Alister Cameron <alister.cameron at cameroncreative.com> wrote:
> WordPress has a function that outputs three attributes. It's
> called language_attributes() and it outputs these three attributes (and
> their values) for the opening HTML tag.
>
> The code looks like this:
>
> <html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(
> 'xhtml' ); ?>>
That is absolutely horrible API designed for tag soup rather than proper XML serializers :/
There's no nice way to use it in PHPTAL (by design).
Instead use more sensible functions:
<html tal:attributes="lang php:get_bloginfo('language')">
--
regards, Kornel
More information about the PHPTAL
mailing list