Hello Joomla community,

I'm forced to write a minimum Joomla (3.4.1) plugin that injects custom meta tags based on an URL parameter. It will be used to serve localized Facebook Open Graph stories.
The problem is, I have literally NO Joomla and PHP background and a VERY tight deadline! Can you please explain how this can be accomplished in a bare minimum implementation?

What I need to know is:

  • What's the easiest/fastest way to create an empty Joomla (3.4.1 compatible) component?
  • How can the current url be read?
  • How can a custom tag be injected to the page?

If those questions are answered, I should be able to figure out the rest by myself, so please explain in as much detail as possible.

Thank you very much!

  • I can't imagine how you will be able to develop a plugin - or component, within a tight deadline with no Joomla and PHP background.
    – FFrewin
    Commented May 29, 2015 at 14:43
  • That's a good point, but with a background in software development, it's not that hopeless. Thank you very much for getting me on the right track! Commented May 30, 2015 at 19:02

1 Answer 1


Assuming that with "Read Current Url", you mean that you want to be able to get request data, then:

$jinput = JFactory::getApplication()->input;
$url_parameter = $jinput->get('url_param', 'default', 'filter');

Extended Documentation with info about the filter options: Retrieving_request_data_using_JInput

To add metadata in the head:

$document = JFactory::getDocument();
$document->setMetaData( 'tagname', 'tagcontent' );

As for the easiest/fastest way to create an empty component, check the Hello World component:




Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.