Osclass forums

Support forums => Plugins => Cars attributes => Topic started by: harry on June 03, 2018, 02:20:20 pm

Title: Car Brand in main page
Post by: harry on June 03, 2018, 02:20:20 pm
Hello

I would be grateful if someone could help to create Car brand as a list on main page as attached picture!
All help will support me!

Regards
Title: Re: Car Brand in main page
Post by: patrickFromCroatia on June 03, 2018, 04:21:26 pm
Hello,

Something like this will do the trick. Just modify it to suit your theme.

Code: [Select]
<?php
echo "<ul>";

$makes ModelCars::newInstance()->getCarMakes();
foreach(
$makes as $key => $make) {
        
$search_url osc_search_url(array('make' => $make['s_name']));
        echo 
"<li><a href='".$search_url."'>".$make['s_name']."</a></li>";
}

echo 
"</ul>";
?>


Regards.