next-drupal icon indicating copy to clipboard operation
next-drupal copied to clipboard

Get path after drupal.createResource()

Open xpersonas opened this issue 1 year ago • 1 comments

Looking for advice.

I'm looking for the best way to get a link to a newly created resource. I'm creating a resource on the fly. After creating that resource, I would like the page to redirect to it.

Click a button > Create a node > Upon completion, redirect to that page.

I was looking at what was returned from createResource(). I don't see a path. I see drupal_internal__nid. So I guess I need to make another API call to find the path.

Just wasn't sure the best way to handle that.

xpersonas avatar Apr 07 '23 14:04 xpersonas

Hey @xpersonas maybe you will get an answer in the next-drupal Slack: https://drupal.slack.com/archives/C01E36BMU72

MathiasGmeiner avatar Jun 02 '23 04:06 MathiasGmeiner