User tests: Successful: Unsuccessful:
Pull Request for Issue #10671.
Allow to add other attributes in JDocument::setMetadata and retrieve them with JDocument::getMetadata.
$doc->setMetaData('generator', 'test generator');
$doc->setMetaData('description', 'test description');
$doc->setMetaData('test 1', 'test 1 value');
$doc->setMetaData('test 2', 'test 2 value', true);
$doc->setMetaData('test 3', 'test 3 value', 'property');
$doc->setMetaData('og:image', 'https://cdn.joomla.org/images/Joomla_logo.png', 'property');
Before patch
<meta http-equiv="test 2" content="test 2 value" />
<meta http-equiv="test 3" content="test 3 value" />
<meta http-equiv="og:image" content="https://cdn.joomla.org/images/Joomla_logo.png" />
<meta name="test 1" content="test 1 value" />
<meta name="description" content="test description" />
<meta name="generator" content="test generator" />
After patch
<meta http-equiv="test 2" content="test 2 value" />
<meta name="test 1" content="test 1 value" />
<meta property="test 3" content="test 3 value" />
<meta property="og:image" content="https://cdn.joomla.org/images/Joomla_logo.png" />
<meta name="description" content="test description" />
<meta name="generator" content="test generator" />
Since _metaTags
is public and don't exactly know the history on this, i'm not sure if this is B/C.
So please confirm.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
Title |
|
Rel_Number | 0 | ⇒ | 10671 |
Relation Type | ⇒ | Pull Request for |
Category | ⇒ | Libraries |
I have tested this item
@andrepereiradasilva if you can also add the: addHtmlNameSpace
Its needed, else the browser plugins can't found the correct meta
That one's not as easy as the <html>
tag isn't generated in an API. So you'd need a plugin to add stuff to that onAfterRender
. JDocument can have the API to add that stuff, it's just a little trickier to get it to render.
If someone's directly manipulating that array perhaps yes. But there's really no other way to make changes without introducing new API and deprecating the existing stuff and I honestly don't see the benefit in that either.
ok thanks.
I leave that decision to the maintainers.
Status | Pending | ⇒ | Ready to Commit |
RTC based on tests
Labels |
Added:
?
|
Milestone |
Added: |
This PR has received new commits.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-06-04 10:09:20 |
Closed_By | ⇒ | roland-d |
Labels |
Removed:
?
|
Thanks everybody
This is great peeps! Thank you!
I have tested this item✅ successfully on 5f5b5ed
Works fine, thanks!
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10682.