Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Routing Question
  • Hello everybody. I'd like to route in the following manner:
    'routes' => array(
      'blog/post/:id'    => 'blog/post/' . $post_title,
      'blog/category/:id' => 'blog/category/' . $category_title,
     ),
    

    $post_title and $category_title should be drawn from the database based on the id provided. Is there a way to put a method in the blog controller that could be called from the config file to return this information? Is there a better approach? For instance:
    http://fuelphp.com/forums/topics/view/136
    
    would become:
    http://fuelphp.com/forums/topics/view/Routing+Question
    

    Thanks!

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!