Advertisement:

Author Topic: Car Brand in main page  (Read 847 times)

harry

  • Newbie
  • *
  • Posts: 20
Car Brand in main page
« 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

patrickFromCroatia

  • Hero Member
  • *****
  • Posts: 753
Re: Car Brand in main page
« Reply #1 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.