I have recently downloaded the ‘Page Loading’ widget.
We have implemented a webpage that links through to another webpage which takes a while to load, I would like the page loading widget to show whilst it is loading.
The widget seems to only work in an interface setting. I would like to set the Destination to ‘authenticated webpage’ possibly by changing the base format: “page-path” in Code Studio?
Any help appreciated.
Hi Lisa,
I have the same as you, with the following in Code Studio, and it doesn’t let me select an Authenticated web page either.
base_format: "page_path"
So to save time I would create a new Page Path Reference to the Authenticated Webpage you want to use (in the following example I chose “PP__AW__MyAuthWebpage”); then just amend line 8 onwards in main.js to:
This hard codes the destination page, however we need to retain the context record. We’ve been successful in appending the context record to the URL, but we’re missing the webpage hash and without this we’re not able to view the page.
Is there a way we can generate a webpage hash and append this to the URL?
As cs.link includes this parameter option and passing a numerical value alone will automatically add it as a context_record_id.
Using a Page Path reference to an Authenticated Webpage in cs.link should generate a link with a hash automatically generated for you.
Therefore I will assume that you’re creating this new link while working through a series of Authenticated Webpages and not a one off; as you want to preserve the previously generated hash.
Therefore in that case we need to get the existing URL parameters in use and append them to the above link by using cs.url_param([name],[default]). Assuming the URL has a parameter of “hash”, that I want to preserve, I would do something similar to the following:
We are working within a flow of authenticated pages. Passing the record id into to cs.link function worked a charm and created a valid link for the widget to redirect to
let record_id = widget.get_base_record_id();
formatted_destination = cs.link(page_reference, record_id);