Welcome Guest, Not a member yet? Register   Sign In
css disappears when adding trailing slash to 4th uri...
#1

[eluser]ramabodhi[/eluser]
Okay I'm using dynamic links to sort the results...
this is what the code works for, and what did work for awhile.... I have no idea why it stopped..

/inventory/view/$username/$sortField/$sortDirection

i can get as far as sortfield ie: inventory/view/someuser/item_age
that will successfully sort by item age..

once i add it to /inventory/view/someuser/item_age/desc
i lose all my css (though the sorting and display work just fine, but my css disappears)..

the results are sorted in my controller by a custom class thusly
Code:
$data['results'] = $this->data->orderBy($results, $sortField, $sortDirection);
$this->load->view('inventory_view', $data);
the orderBy function in the data library is thus
Code:
function orderBy($array, $index, $order)
            {    
                if($order=='asc'){
                    $code = "return strnatcmp(\$a['$index'], \$b['$index']);"; usort($array, create_function('$a,$b', $code)); return $array;
                }elseif($order=='desc'){
                    $code = "return strnatcmp(\$b['$index'], \$a['$index']);"; usort($array, create_function('$a,$b', $code)); return $array;
                }else return $data;
            }
any ideas why my css disappears when i add a fifth uri segment but everything works fine?


Messages In This Thread
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 04:57 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 05:05 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 07:26 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 07:27 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 07:35 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 04-30-2009, 07:38 PM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 12:29 AM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 05:57 AM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 05:59 AM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 06:52 AM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 07:02 AM
css disappears when adding trailing slash to 4th uri... - by El Forum - 05-01-2009, 07:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB