/

 

The manual

Self-training

Experimentation

Contact

 

Language

The models

Presentation of the models area

Templates are an area on the left of the window, just under the word 'templates'.

This zone is always visible in 'Edit' mode (under the contextual menu), but optional in 'View' or 'Organize' mode where its display is controlled by the icon opposite.

Here is an example of a models area:

There are 4 types of lines in the model area. A symbol at the start of the line announces the type of each line:

This is a plug.

This is a link.
It's the equivalent of a bookmark in your web browser.

This is a sub page in the model tree.

Allows you to return to the parent page when you have gone down to a sub page of the model tree.

In fact, there is a fifth type of model. If you go into some template pages, you will find that a form automatically appears at the top of the window. It is then called a tool model. We use this to provide automatic processing tools for the content of the page. For example a tool that will pre-sort the emails that are there, or will automatically produce the invoice for the following month by automatic adaptation of the invoice in the page, etc.

Set up, modify the models area

Access the pages defining the models area

The content of the templates area is defined by a tree structure of Storga pages, just like the rest of the site. Simply, the blocks in the pages are not interpreted in the same way.

Line type
in the zone
models

Block type
really present in
the pages defining
the model tree

Explanation

The empty form that is made available must be encapsulated in a 'Model' block

There is no difference between links in normal pages and favorites (links) in the model tree.

There is no difference between a sub page in normal pages and a sub page in the model tree.

Adding the line
is implied.

In the normal tree structure, the icon opposite of the 'View' mode is used to go back to the parent page.
In the model tree, we use the line that starts with the sign ◂

There are several ways to access the model tree. The easiest way is to activate the page of the models you want to modify using the lines preceded by the symbols ▸ and ◂, then to switch to the model tree using the icon shown below. against 'Edit' mode.

Create a template file

Here is an example of a model providing a contact card:

Fiche contact   Template

Contact

Prénom:

Nom:

Email:

Here is now its view in 'Organize' mode with 'Detailed' option:

We see that the file has simply been encapsulated in a 'Model' block.

Warning: if you cannot find the yellow bar to drag the file into it, you forgot to activate the 'Detailed' option of the 'Organize' mode

Note: generally we encapsulate a form, but in fact, we can encapsulate any template. We can very well encapsulate a polite formula for standard letters, a header, etc.
We can also encapsulate several blocks.

Create a link or a sub page in the model tree

Switch to the model tree, as explained above, then create the link or subpage just as you would in a standard tree page.

Create a tool template

The form that contains the program will be encapsulated in a model block, exactly as for an empty form, but the 'Insertion mode' field of the model block will be set to 'This is a tool (displayed in the window above)'

Automatic update of records

In the previous contact model, if the contextual menu corresponding to the form floor is displayed:

And if we ask for the 'Properties', we get the following list of parameters:

Note that the 'Automatic update' field has been filled in with exactly the same code as what is displayed on the 'Reference to form' line

The meaning is as follows:
When contact cards are created using the '⊕ Contact card' line in the models area, these cards will remain connected to the original item in the 'Model' object.
Subsequently, if we make changes to the original copy, for example adding a telephone number field, AND change the version number of the record (the version number is the second field in the 'Type of form' table visible in the screenshot above), then as soon as a user displays a contact card, it will be automatically upgraded.

Note: to copy paste the form code, you can press the control key on the keyboard, then click at the top left of the area to copy, drag without releasing either the control key or the mouse button, all the way to the bottom to the right of the area to copy, then release the mouse button. The content will be copied to the clipboard. Then, all you have to do is click in the 'Automatic update' field and then press the 'Insert' key to paste.