Setting the preview document

Sometimes you are editing a document that is not intended to be viewed directly, but only part of another document. This could be a JavaScript script or a CSS stylesheet that displays nothing by itself, but is attached to the HTML document. Similarly, you can edit a document to be placed in one of the frames of another document. Another common case is when you create a project that uses server-side technology, such as PHP . In this case, it is common to combine several mi function files into one document, for example with the include () function.

In any such case, you can set a "preview document" for the edited document. The Spider will display the document set here when you bring up the preview of the edited document. The preview document can be located both on the local computer disk, on the Internet server, etc.

For example:
You edit a my_script.js file, which is attached to the my_document.html. When you call the my_script.js preview, the my_dokument.html will be displayed.

The preview document can be set for the entire project (in the Project Properties window) and can be saved separately for each document in additional document information .

The preview document has one more, additional meaning, not directly related to viewing documents. The above-described linking of PHP scripts can be done by dragging them to the current script from the list of files. In this case, the Spider will ask whether to create a path to the attached file relative to the preview document. If the current script is just a module located in a subdirectory, and not a standalone script that displays the finished document, it may be more appropriate to create a path to its preview document, because ultimately, it is this document that will create paths when linking scripts by the PHP interpreter.

Options for the Setting Preview Document window

Use the preview document assigned to the project
If you select this option, it will display the document indicated as the preview document in the Project Properties window when the Review tab is activated.

Browse with a document
Select this option and indicate the document to be used to preview the current document.

Do not use a preview document
Check this option if the current document is always to be viewed directly (the preview document will not be used, even if it has been indicated in the Project Properties window).

Pass the following parameters when previewing:
Select this option and enter the parameters to be passed on to the preview document. With this option you can simulate the transfer of form data to the document.

To add a parameter, click the plus sign on the menu next to the parameter list and in the window that will open, enter the name of the parameter and its value.

For parameter passing to work, browsing mapping and the server that will handle the request must be enabled.

The parameters will be passed using the GET method, i.e. in the URL.

For example - assuming the address to where the preview document is shared is https: // localhost/ ), if you set the options:

  • preview document: my_document.php
  • name: program
  • value: Spider
then the URL address of the document that will be displayed will look like this:
  • https: //localhost/my_document.php?program=Spider

Related topics

To top