Add ability to use any context with setMetaData & getMetaData #681

wants to merge 3 commits into


None yet

6 participants


JDocument/setMetaData is currently limited to the name and http-equiv contexts.

In HTML5 the meta tag also now excepts the 'itemprop' and 'charset' contexts. Other specs such as Open Graph use custom meta tag contexts like 'property'.

To add support for these new and future uses of the meta tag, I'd like to propose making the third argument of JDocument/setMetaData a mixed value (boolean (legacy) ~ string).

HTML5 Microdata - itemprop

Open Graph - property (Non-Valid)


Unit testing complete. There were 0 failures and 0 errors from 1971 tests and 11142 assertions.
Checkstyle analysis reported 199 warnings and 2 errors.


I don't think this is the right solution.

For charset we already have a dedicated function. We just need to get a HTML5 switch for the renderer to take care of the new ways.

As for itemprop, that would be more interesting. Personally I'd kinda like to take the wait and see approach on the Microdata/RDFa stuff and come up with a more unified approach until we start modifying API.


Thanks Rouven,

Is there a discussion going on about Joomla and HTML5 or is there a thread I may have missed that you could point me to? It had been discussed on the ideas forum but nothing seemed to come of it.

It's not a mater of if microdata will be the standard, but when. The when will be affected by how quickly platforms such as Joomla adapt it. Google, Bing and Yahoo are all pushing microdata with

Just because contexts such as 'property' (Open Graph / Facebook) are not valid, doesn't mean they are not used. In fact OG metatags are widely used in Joomla installations. This pull request would at least add the ability to group all metatags neatly.


Right, I didn't get to add that (very simple) code in time for the PBF event. I got sidetracked by RL stuff and had other priorities on my J! work.

Since I had to do a JDocument pull request today anyways I've added the code for it there. It's #386. If we get lucky it gets merged in time for 2.5.


Cheers Rouven


This pull request could not be tested since the changes could not be cleanly merged.


Sorry about that @joomla-jenkins new to this pull request stuff ;)

Changes reverted.

chdemko commented Feb 22, 2012

@bigbangireland The pull request cannot be merged


This has been sitting for over 2 months without update and is not currently mergeable. I'm going to close it for now. If you want to continue the discussion please rebase the branch against current master and re-open the pull request. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment