actually, rails runs a sort on the attributes hash before outputting it so
they're pretty reliably in alpha order. i'd give search engine programmers
the benefit of the doubt though and assume that they were smart enough to
parse html attributes correctly instead of asserting a specific string in a
specific order. ymmv

RSL

On Tue, Sep 16, 2008 at 10:57 PM, Nathan Weizenbaum <[EMAIL PROTECTED]>wrote:

>
> Haml attribute hashes are plain old Ruby hashes. Since Ruby hashes are
> unordered, it's not possible to guarantee that the attribute output will
> be ordered.
>
> spiralstarez wrote:
> > Greetings,
> >
> > In various SEO tools it's telling me that I don't have meta tags for
> > keywords and description etc.  I do, and I'm using HAML to output them
> > like this:
> >
> > %meta{:"http-equiv" => "Content-Type", :content => "text/html;
> > charset=utf-8" }
> > %meta{:name => "keywords", :content => "keyword, keyword, keyword" }
> > %meta{:name => "description", :content => "Descrption" }
> >
> > these are outputting properly, however they are outputting the
> > attributes in the opposite order.  I did a quick test on something
> > else and noticed that this is alphabetical?
> >
> > This is what is output from the above code:
> >
> > <meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
> > <meta content='keyword, keyword, keyword' name='keywords' />
> > <meta content='description' name='description' />
> >
> > So even if these are correct to google and search engines, some
> > optimizers on the web don't read them properly.  Is there a way to
> > change the order of the output items?
> >
> > Regards,
> >
> > Jason
> >
> > >
> >
> >
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to