When using Uniform releases, you can schedule some content to be available at a specific time and date. Sometimes you may want to preview how this site would look like when the release is launched. Uniform SDK provides an attribute called releaseId
to pass into the RouteClient.
Here is an example scenario:
NextJS Page Router: You can add it in requestOptions under withUniformGetStaticProps or withUniformGetServerSideProps like this:
NextJS App Router:
Add it like this for the retrieveRoute call:
Using query string like this may exposes the not published content from the release to the public. Anyone with the release ID value may be able to see those pages. You might consider adding an additional key or secret to prevent an unnecessary access.
How to use it?
release
query string parameter in URL. Or open the release and check the last ID from the URL