Home News Contact Us Forum About Us Demos Products F.A.Q.
Shopping Cart
You currently have 0 items in your cart.


Recent Events
  • 31/12/2023 New Year SALE

    We are glad to announce New Year SALE. 25% discount for all our extensions. Use NY24 coupon code. Hurry up the discount is valid till 7 January.

  • 21/11/2023 BLACK FRIDAY 23 is coming

    BIG SALE, 35% discount for all our extensions. Use BF23 coupon code. Hurry up the discount is valid till 27 November.


2Checkout.com, Inc. is an authorized retailer of goods and services provided by ARI Soft. 2CheckOut




Follow us on twitter



Welcome, Guest
Please Login or Register.    Lost Password?

How We Can Add Meta Robots? It is easy?
(1 viewing) (1) Guest
ARI Quiz Lite
Go to bottomPage: 1
TOPIC: How We Can Add Meta Robots? It is easy?
*
#40982
How We Can Add Meta Robots? It is easy? 10 Years, 11 Months ago Karma: 0
Is there a way to add the Meta Robots inside the extension?

I just check the Noindex plus follow inside the Menu Item I create from this component but it is not working.

Is there a way to fix this?

Code:

<meta name="robots" content="noindex, follow" />
The administrator has disabled public write access.
 
#40984
Re:How We Can Add Meta Robots? It is easy? 10 Years, 11 Months ago Karma: 747
Hello,

Open <joomla_directory>\administrator\components\com_ariquizlite\kernel\Web\class.UserQuizPageBase.php file and add the following code to "_init" method:

Code:


$app = JFactory::getApplication();
$params = $app->getParams();
if ($params)
{
$robots = $params->get('robots');
if ($robots)
{
$doc = JFactory::getDocument();
$doc->setMetadata('robots', $robots);
}
}



Regards,
ARI Soft
The administrator has disabled public write access.
 
#40988
Re:How We Can Add Meta Robots? It is easy? 10 Years, 11 Months ago Karma: 0
Thanks it does works.

Great support, I soon will send you some traffic from my Joomla Database users, so they can check your extensions.

To apply the changes I just did this.

I change this around line 43 or so:


Code:

function _init()
{
global $Itemid;
$this->_resultController = new AriQuizResultController();
$this->_quizController = new AriQuizController();
$this->addVar('Itemid', $Itemid);
parent::_init();
}



To this

Code:


function _init()
{
global $Itemid;
$this->_resultController = new AriQuizResultController();
$this->_quizController = new AriQuizController();
$this->addVar('Itemid', $Itemid);
parent::_init();
$app = JFactory::getApplication();
$params = $app->getParams();
if ($params)
{
$robots = $params->get('robots');
if ($robots)
{
$doc = JFactory::getDocument();
$doc->setMetadata('robots', $robots);
}

The administrator has disabled public write access.
 
Go to topPage: 1