| HTML5 breadcrumbs module for Joomla! |
| Τετάρτη, 18 Μαίου 2011 11:17 |
|
I'm just starting to get my suitcases ready for the HTML5 train and one of the many things on my 'todo' list was to see how I can produce some decent HTML5 markup for Joomla! breadcrumbs. Since there is (and will be for a long time it seems) a lot of discussion on how should breadcrumb markup be implemented in HTML5, i played safe and went with Google recommendation (not great markup but seems to serve microdata purposes well) for the extra benefit of displaying site hierarchy in SERPs. So, the produced markup goes like this: <nav id="breadcrumb"> <div itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> Note that all divs are nested and second+ level gets an itemprop="child". CSS wise, you'll probably need to do this so that the divs stay inline: #breadcrumb div {display:inline;}
Let me know what you think. |










Σχόλια
Great plugin with only one issue - it doesn't inline in IE (in all other browsers do) even if the native breadcrumbs module looks just fine. Could you help with the issue?
#breadcrumb div {float:left}
There is a good chance this will mess your template so you might have to clear the float after the module loads, if you need some more help with that let me know.
The general idea is to have an element - after the floating one - which clears the float, ie:
< div blah blah your floated breadcrumbs here...< / div >
< div class = " clearfix " > < / div >
and css says:
.clearfix {clear:both;}
and maybe a few other things to work better.
Dont copy from here, as i put extra spaces.
By the way, it didn't mess up my theme either
I forget to ask: if there any chance to "modify" current native joomla breadcrumbs plugin to have HTML5 functionality? I really like what you create, but, unfortunately I have just a little bit skills to make it work with IE. Otherwise, if use standard breadcrumbs plugin and add to it some code to markup trail, it would be really useful.
I'm not sure if it's possible, but from my point of view this is the best way to make it work quickly.
What would you say?
If wrap the lines
echo 'link.'" class="breadcrumbs pathway" itemprop="url">'.$list[$i]->name.'';
echo ' '.$separator.' ';
in div with, for example echo ''; and add to css #breadcrumb-inside div {display:inline -block;} it displays in all browsers including IE just fine. But in this case no markup is shoun in rich snippet testing tool.
Could you advise how to implement additional div to the home link and keep breadcrumbs recognizable in google?
#breadcrumb div { display:inline; }
will most likely do the job. If not, i'll need a link of your site to check your html.
RSS feed για τα σχόλια αυτού του άρθρου.