Search in support tickets

#81 – Metadata on AdsManager menu items

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Thursday, 26 October 2017 09:50 CEST
nocturna
Joomla! version : 3.7.5
PHP version : 5.6.25
AdsManager version : Gold 3.1.11

Hello good day.

I have seen that by assigning metadata to the AdsManager menu items (Home, All ads, Post ad) are not displayed in the source code of the page, therefore, they have no effect.

Is it possible to assign metadata to these menu items? Or is it better to use the metadata in the general Joomla configuration in this case?

If I am right, in the latter case, the metadata of the Joomla configuration will appear on all pages that have not defined their own metadata.

Can you give me any indication?

Thank you very much,

Best regards

J Andrés B
Custom Fields
Joomla Version
3.7.5
PHP Version
5.6.25
Product
AdsManager
Product Version
AdsManager Gold 3.1.11
Friday, 27 October 2017 08:55 CEST
loic
Hello,

To add that feature, you need to open the files view.html.php for the view you wish to custom, for example, for the home page :
- Open the file components/com_adsmanager/views/front/view.html.php and just before the line parent::display($tpl); add this :
[code type=php]
$params = $menu->getParams();

if ($params->get('menu-meta_description'))
{
$document->setDescription($params->get('menu-meta_description'));
}

if ($params->get('menu-meta_keywords'))
{
$document->setMetadata('keywords', $params->get('menu-meta_keywords'));
}
[/code]

Best regards.
 
Saturday, 28 October 2017 11:15 CEST
nocturna
Many thanks Loic,

I've tried this as you indicated, but when you enter the Home page everything is blank, the content does not appear. I do not see at the moment what the reason is.

Thank you very much,

Best regards,

J Andrés
Saturday, 28 October 2017 11:36 CEST
nocturna
Hello again,

My apologies, I have already solved this.

Thank you very much for your response Loic.

Best regards,

J Andrés

Saturday, 28 October 2017 17:19 CEST
nocturna
One last thing, please:

To make these overrides I must make them in the original view.html.php files in the different views (front, lis, edit). Then, when I update the AdsManager component I will have to make the changes to the files again.

This is not a problem, but I have discovered the following extension:

EFSEO - Easy Frontend SEO

At the following URL:

https://joomla-extensions.kubik-rubik.de/efseo-easy-frontend-seo


As I see it, this extension would allow me to control the metadata of all the pages included (HOME, ALL ADS & POST AD) without needing to make changes in the .php files

Do you think it is an interesting extension? Or is it better for me to make the changes you have indicated?

Many thanks again Loic,

Best regards,
Monday, 30 October 2017 08:36 CET
loic
Hello,

If that extension do the job then go for it :).

Just do a backup before trying it, you never know what may happen.

Best regards.
 
Monday, 30 October 2017 18:01 CET
nocturna
Hello,

Thank you very much for your response and tips Loic.

My question is resolved, this ticket can be closed whenever you want.

Best regards,

J Andrés
Tuesday, 31 October 2017 08:35 CET
loic
Hello,

I close the ticket.

best regards.
 
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.