I'm new to Drupal 7, and I have a big question.
How do I create a page where the URL is based off of a number in the database?
For some more details: I'm currently trying to create a form that has to do with a product that was bought. My idea was to use the order_id that comes in from an ubercart order, assuming that the uid matched the current user and the order status is completed. So, the URL would then be siteurl/content/(order_id)/new. Later, I plan on showing a themed page that has to do with this order number, which would then be siteurl/content/(order_id)/view, and you could edit that form by using siteurl/content/(order_id)/edit. Please assume I'm a complete noob when it comes to Drupal!
I can't show you the exact site as it's not live yet. If you give me code to try, please tell me where exactly I should put it, because I'm unsure where all the code is in relation to specific pages on the site.
Thank you so much for your help!
Comments
You may checkout this module
http://drupal.org/project/pathauto
If there is no right token for you, you can make one by
http://drupal.org/node/1143842
http://drupal.org/project/token_custom
thanks
Keith
Drupal, AWS, DevOps
Im not sure whether path-auto
Im not sure whether path-auto would help. since i think order-id will be generated only after saving the order.
Then set weight like
form_submit
your_custom_module
pathauto
or add a custom form_submit action before original form_submit to generate the order-id ?
Drupal, AWS, DevOps
Thanks!
Awesome, that helped so much! Thank you!!