Log in to your Wix account and open a blank template in the editor.
Activate the Corvid in the Wix editor to work with code on your site.
Click Add on the left side of the editor, then add the page elements and set the ID in the properties window that appears on the right side of the editor.
1. Open the code field at the bottom of the editor
3. Add the code to define the OnReady () variable and to define the functions, etc.
Finally, click on Preview in the top right of the editor. Then check the result and publish your website live and ready for production.
The following principles apply when developing the application on Corvid.
Page rendering process:
The page section of the site lists all regular, dynamic, and Router Pages on your website. Normal pages are displayed directly under the section title. You can change the page setting by moving the mouse pointer over the page name. The dynamic pages with the same prefix, which are summarized in the same section. You can add a dynamic page to a group by clicking the settings icon that appears when you hover over the section name. Dynamic pages change their content from one-sided design to many live site pages. There are two types of dynamic pages. An article from your content collection is displayed on the article pages. The other type of dynamic pages is a category-side menu that is linked to your article pages. When you add the dynamic page to your site, both the dynamic pages of the item and the category are added. The pages are automatically added with dataset connectors. The Dataset connectors connect the pages to your collections. The router gives you complete control over the processing of certain incoming requests to your site. Enter the URL prefix for the router and click Add and Edit Code. All incoming requests from the URL prefix are sent to the router for processing.
The page must be set up before it is rendered to the visitor. Setting up a page involves adding and positioning the items, and executing the code that retrieves the page data or performs other setups. This is called rendering. The onReady () function is therefore executed both on the server and in the browser. While a page request is running on the server, the browser downloads and executes the same code. After the server returns the response and the page is visible, the browser renders the page and makes it interactive. The onReady () function is therefore executed twice. Once in the backend and once in the browser. You need to add code explicitly to avoid side effects like inserting an item twice into the collection. The rendering API ensures that the code parts are executed only once. The wix-window property that keeps track of where your code is running. The variable “env” retrieves the current environment, which returns “browser” when rendering on the server and “browser” when rendering on the client. So you need the env property if you use the insert () function of the wix-data API to add an element to your collection only once.
When you activate the Corvid, it will be added automatically Wix data to your site, with which you can work with integrated databases. Wix apps have amazing features that help you improve and grow your business. When you add so many Wix apps to your site, their data is automatically added to your site as a new collection. Once you’ve activated the databases on your site, you can use Wix Visual Builder to Connect your data about elements on your site, such as collecting user input and creating dynamic pages. You can also create dynamic pages custom router. Corvid supports connecting the external database to the External database SPI and work with the database on your site with our built-in collections.
3. Import data into the Content Manager:
You can use the Content Manager to create and save content in collections. Link your collections to various elements in the editor to view the content or form submission. You can save the content of the site in content collections. This can be the content you have created, the content you have entered, or both. The content is stored in a grid layout consisting of elements (rows) and fields (columns). When you create a new collection, you can choose a preset collection or workspace. After you add the content manager, certain editor elements such as text and images connect to your new content collections.
Once you’ve saved your information in a spreadsheet, you can import data from a CSV file into database collections. You can export data by making changes in the spreadsheet application and importing them back into the database collection. You can also import into the sandbox database in the editor and into the live database in your dashboard. When importing into the sandbox database, you can add new fields to the database structure at the same time. However, when importing into the live database, you can import fields that are part of the database structure.
Your visitor can register in the member area and become a member of your website. There are 3 types of membership forms. Those are
1. Standard registration form
2. Custom registration form
3. Corvid shape
Simply click on the menus and pages in the editor, then on the member registration form and select the form type. In the Corvid form, you can choose your form from the dropdown menu “What does it connect to?” Choose. The custom forms are site-specific requirements by adding the user input elements and content manager to the website. Follow these steps when creating a custom form with user input.
Create the collection to save the form submission information
Add the user input elements to create a form on the page
Set each item using the settings panel
Add and set up a dataset to connect your page elements to your collection
After setting up a dataset, connect your elements to it
Add a submit button and connect to your record so the user can send the information to your collection. When the visitor submits the form, the information will appear in your inbox.
* Email account that you have set in your form settings
* the transmission table in the dashboard
4. Open platform:
Corvid extends the website functionality to other services such as installation NPM packagesUse our on-demand to invoke external APIs and provide the functionality of the site as an API with ours HTTP functions. You can bring the complex features to your site with the software registration packages. In npm, every reusable code library is called a package. Once installed in the site structure, you can import the package and use it in your code.
5. Secret Manager:
Corvide enables you to integrate third-party services such as API keys into your site’s code. Third-party services require an API key for authentication. This service provides the key that you can add to the code that calls the service. Here you can save secrets like API keys. It is securely stored and encrypted in the Secret Manager on the site dashboard. The procedure for working with API keys is:
1. First, get the private information as an API key from the third party.
2. Save the private information under a new name in the secret manager
3. In the backend code, the value of the secrets extracted with the getSecret () function instead of the API key.
With web modules, you can write functions that are executed on the server side in the back end and call them in the client-side code. With web modules you can import functions from the backend into files. You need the function code of the web modules to run on the client side or want to access other web services. You can only export the functions from web modules. For example, if you want to allow a site visitor to send an email, you have to write the function that sends an email on the server side. Because the code can have security problems when running client-side or web services. You can import the web module function into another module in the backend or frontend file.
Note: We are not the author of this content. For the Authentic and complete version,
Check its Original Source