hi, i'd like to have a route for my posts like this:

post_by_slug:

  url:      /:sf_culture/post/:slug

  class:    sfDoctrineRoute

  param:    { module: openbubble, action: show }

  options:  { model: OpenBubble, type: object }

I call the links like this in indexSuccess.php:
<?php echo link_to($post->getTitle(), 'post_by_slug', $post) ?>

my actions.class.php is:

public function executeShow(sfWebRequest $request)
  {
    $this->post = $this->getRoute()->getObject();
  }

and in the showSuccess.php I've:

<?php echo $bubble->getId() ?>
<?php echo $bubble->getSlug() ?>

everything "looks" good (as in: the links are genrated correctly and
succesShow displays something), but no matter what slug I pass (even
an inexistent one) I always see the post with ID=1.

any Ideas why? as well, I was wondering what does the @ in front of a
route-name mean? when do you use it? if I add it to my link_to I get
an error saying that the route misses the slug.

thanks a lot
Marco

http://forum.symfony-project.org/index.php/m/73455/19006/0///#msg_73455
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to