Search in support tickets

#110 – Maximum number of main categories in HOME page

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, 16 November 2017 12:48 CET
nocturna
Joomla! version :
PHP version :
AdsManager version :

Hello good day.

How can I do so that only a maximum of 9 main categories are displayed on the HOME page?

I guess some override in file, but I do not know what the code is.

Thank you very much,

Best regards,

J Andrés
Custom Fields
Joomla Version
3.7.5
PHP Version
5.6.25
Product
AdsManager
Product Version
AdsManager Gold 3.1.11
Thursday, 16 November 2017 15:48 CET
loic
Hello,

You need to custom the code a little.

In templates/adsclarity/html/com_adsmanager/html/front/default.php, add this line 96, the line before the -> foreach ($this->cats as $row) {
$cptCat = 0;


And line 115, after the line containing -> if ($row->level == 0) {
if ($cptCat >= 9) {
continue;
}
$cptCat++;


Please let me know if it doesn't work, I didn't test that custom code.
As usual do a backup of that file before modifying it.

Best regards.
 
Thursday, 16 November 2017 18:15 CET
nocturna
Works perfectly Loic, thank you very much.
This ticket can be closed,

Best regards,
J Andrés
Friday, 17 November 2017 16:32 CET
loic
Hello,

Great news :)

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.