Render API: How to use dynamic page

I’m following the docs from Using the Render API | Learn Plasmic, and adding componentProps and globalVariants works, but if I want to render a page that has dynamic path params, I don’t find any way to add this to the call.

I can use a path instead of the component name (inside the URL “https://codegen.plasmic.app/api/v1/loader/html/preview/PROJECTID/COMPONENTNAME”), and it matches the correct component/page (seems like pages are just special components). So If I have a page located at /profile/[slug] and I use the encoded string of “/profile/someuser”, it renders the right page – but the page itself has no $ctx.params.slug set.

So 2 questions:

  1. why is the path correctly resolved but the page has no $ctx.params.slug?
  2. how can I manually add it to the request in the way I’m using componentProps and globalVariants?

I tried to infer it from the plasmic code but it’s too nested.

Hi, that’s currently not supported. We will consider supporting it.

Hey @fmota, thanks for responding quickly! Alright, yes it would be really nice to have but until then I can work around using a component instead.