help desk
What would be the best way to include a widget in a spa page.
When creating a spa page, if your page needs a spa widget that does not auto load another page, you do not need to include the spa widget. You can simply create a <div> with the id,Instead of
<div class="row mt-2">
<div class="col-12 col-sm-12 col-md-12 col-lg-9 col-xl-10 p-3">
{_{
// Set widget uuid
wuuid = "9cfaef69-2aa3-4b75-a4a0-4c4de2a3ebfb";
// Build widget object
wuuid = {
"uid_position": wuuid, "uid_widget": wuuid, "uid_instance": wuuid
};
wconfig = {
"rows" : {
"ws_url": "",
"selector_id": "ps_patient_edit_insurance_policy",
"with_web_socket": "no"
}
};
%include "/toolbox/module/sed/app_single_page/widget/w_manager.sn";
}}
</div>
</div>
You can do
<div class="row mt-2"> <div class="col-12 col-sm-12 col-md-12 col-lg-9 col-xl-10 p-3"> <div id="ps_patient_edit_insurance_policy"></div> </div> </div>
Since all js needed for the spa widget were already loaded in the first page (extranet) no need to reload it's code over and over.
Replied on: 2022-08-26 07:08:00