• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Could I use a route for this?

#1
[eluser]jzmwebdevelopement[/eluser]
Hey,

Below I have a function that gives me a url for every listingId that is found.

Is it possible to do this via a route?

At this stage I want to load a view for each
Code:
$subCat
but use the
Code:
$mainCat
as a main navigational item with the
Code:
$subCat
as a sub dropdown option that loads the specific view.

Code:
$detailsFunction = $this->createCategoryDetails();

  $ld = array();
  $url = array();

  foreach ($detailsFunction as $main)
  {
   $ld = array('listingId' => $main['listingId']);
  
   foreach($ld as $id)
   {
    $mainlisting = $main['listingId'];
    $mainCat     = strtolower($main['mainCat']);
    $subCatO     = strtolower($main['subCat']);
    $subCat      = str_replace(" ", "-", $subCatO);

    $structure = base_url().'listings/'.$mainCat.'/'.$subCat;

    var_dump($structure);

   }


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.