How to pass Dynamic value via param in symfony 1.4 routing.yml

582 Views Asked by At

I want to display the external url like this:

www.abc.com/username

This page requires group_id, ticket_id, but i dont want to display these variables in external urls.

My routing.yml:

my_profile:
  url:   /:username
  param: { module: profile, action: index, grp_id: GRRf3eedfb7-842d-4cbd-a17f-141334cd1b4d, ticket: UAe25d7784-7b9f-499a-8e53-57f5aee91d95, display: true }

indexSuccess.php

echo url_for('@my_profile?module=profile&action=index&username='.$username.'&grp_id='.$groupID.'&ticket='.$ticket)

Note that in the routing.yml params has static grp_id and ticket. It outputs Nicely.

However, I want want to make it dynamic. grp_id and ticket should come dynamic values and they should not be visible in the URL.

0

There are 0 best solutions below