<link rel="stylesheet" href="https://widget.saleshandouts.com/widget.css">
<script src="https://widget.saleshandouts.com/widget.js?version=<?php echo date("U"); ?>" type="text/javascript"></script>
<script>
var widgetDiv = document.createElement("DIV");
document.body.appendChild(widgetDiv);
widgetDiv.id = "_widget";
window.MyWidget("_widget", "bottom-right");
</script>
bottom-right
bottom-left
top-right
top-left
In the DB widget has 3 components and we need to update them in this order.
widgets
Table (widget primary
data) note the widget_id
after creating a widget.url_components
table - this maps
different urls to their corresponding widgets via widget_id
obtained in step1
.
fields
.you can have either of the following url/url patterns.
/:anything
will match
/xyz
but not /
/abc/:anything
will match
/abc/pqr
/:anything/abc
will match
/123anything/abc
as long as the last component has /abc
Currently limited to text type fields only (text, number, email)
In the project directory, you can run:
yarn start
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
yarn test
Launches the test runner in the interactive watch
mode.
See the section about running tests
for more information.
yarn build
Builds the app for production to the
build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the
hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
yarn build:widget
builds Js only and puts the compiled JS file into
public_html
folder.
this also supports lazy loading.