Welcome, Guest
Username: Password: Remember me

TOPIC: Metadata Addition

Metadata Addition 20 Oct 2015 17:37 #13605

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Anyone successfully integrated meta data such as Open Graph into their component?

I.e all data is taken from data entered into your component rather than site wide / menu meta data from a general site meta plugin
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.

Metadata Addition 30 Oct 2015 08:29 #13651

  • Romkabouter
  • Romkabouter's Avatar
  • Offline
  • Elite Member
  • Posts: 310
  • Thank you received: 131
  • Karma: 48
No, but you can use (for example):

$doc = JFactory::getDocument();
$doc->setMetaData( 'og:title', 'Title' );

You can use it in your display funcion in the view.html.php of a record if you need information from a record or anywhere else.
As long as you use de getDocument en setMetdaData, it will end up in the head of your page.

api.joomla.org/cms-3/classes/JDocument.html#method_setMetaData
Last Edit: 30 Oct 2015 08:30 by Romkabouter.
The administrator has disabled public write access.
The following user(s) said Thank You: MorganL

Metadata Addition 30 Oct 2015 10:23 #13652

  • MorganL
  • MorganL's Avatar
  • Offline
  • Platinum Member
  • Posts: 438
  • Thank you received: 53
  • Karma: 15
Well found!
Morgan Leecy MCSE

Novell / Linux
PHP. MYSQL, Apache, node.js
Coldfusion, JQuery, HTML5
Joomla
The administrator has disabled public write access.
Time to create page: 0.061 seconds

Get Started