I want to create a Joomla Module that has the capability to write its own text based on the GET data within the submitted URL, it sounds feasible, let's say the submitted URL is


then the created text is

JAKARTA is within our service coverage area

Now I want the JAKARTA is within our service coverage area to be visible in the Description metadata in the HTML Header, it is the Joomla website of course. it should look like this

<meta name="description" content="JAKARTA is within our service coverage area">

Consider Google SEO, I want this meta description to be rendered as early as possible because I want Google to Catch this and recognize it as valid metadata. Can we do that?


1 Answer 1


Yes, you can do that with something like:

use Joomla\CMS\Factory;

$keyword = Factory::getApplication()->input->get('yourarea', '', 'string');
$document = Factory::getDocument();

    $document->setDescription($keyword . ' is within our service coverage area');

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.