uri segment

edited March 2011 in Modules
hi,

I have build an adv module which have its own controller, now it seem like i can't get the url segment work, as long as i put any additional parameter http://domain/fuel/module/parameter , it will just redirect to 404 error page.

my suspect is the route setting for the module, but i already added
$route[FUEL_ROUTE.'appt/calendar/(.*)'] = APPT_FOLDER.'/calendar/$1';

can admin help on this ?

Comments

  • edited March 2011
    So that I'm clear, you have an advance module named "appt". In that module you have a controller named "appt" which has an additional method on it of "calendar" which can accept parameters like so:
    function calendar($param = NULL){...
    And your route (without constant variables) is:
    $route['fuel/appt/calendar/(.+)'] = 'appt/calendar/$1';
  • edited 7:14AM
    ya i have a appt adv module , nope i don't have appt controller , because appt by default is access the standard module feature.
    i have these in my route to take care of it
    $user_controllers = array('standard','rating','request'); foreach($user_controllers as $c) { $route[FUEL_ROUTE.'appt/'.$c] = FUEL_FOLDER.'/module'; $route[FUEL_ROUTE.'appt/'.$c.'/(.*)'] = FUEL_FOLDER.'/module/$1'; }

    but for this module , i have some stand alone feature to display, so i created calendar controller in this appt adv module and added this in route

    $route[FUEL_ROUTE.'appt/calendar'] = APPT_FOLDER.'/calendar';

    so now calendar controller is working fine by itself but not with additional parameter

    And your route (without constant variables) is:
    $route['fuel/appt/calendar/(.+)'] = 'appt/calendar/$1'; <---- this is correct
  • edited 7:14AM
    argh find out the problem , i should use _remap() in stead of index() on my controller ...
  • edited 7:14AM
    on a sidenotes , when visit this forum on iphone, it seem like display a "Bonk" error page
  • edited March 2011
    Glad you figured out the issue. Sounds like I need to figure out one myself... I'll look into that Bonk error message.
  • edited 7:14AM
    You should now be able to view the site on the iPhone now... thanks for letting me know.
  • edited 7:14AM
    yup looking fine on iPhone now.
Sign In or Register to comment.