Advertisement:

Author Topic: Car Brand in main page  (Read 1018 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

WEBmods

  • Hero Member
  • *****
  • Posts: 936
  • github.com/webmods-croatia/love-osclass/ | patrick
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.