Falcon Space. System setup

Смотреть видео

Section System SQL (/sysSP)

  • Search procedure (falcon_search) - global search procedure (in the site header). 
  • GetLayout (falcon_getLayoutInfo) - the extraction procedure for building a page (language, layout settings, etc.). It is carried out when each page is loaded.
  • Periodic startup (falcon_sync) - stored procedure that are started by a period. In order for them to work correctly, you need to set up a minute-by-minute address call from an external service (see the corresponding section)
  • Generation sitemap.xml (falcon_sitemap) - creating a site map as a file sitemap.xml

General settings section/settings

  • mail…. - Mail sending settings
  • commonScripts-markup before the closing tag (counters, scripts, global buttons, etc.)
  • commonStyles-add styles to, connect fonts 
  • apiType - API output type. Either XML or JSON 
  • brand - What is displayed at the top left (site name)
  • logChanges - log or not changes to entities (if not used, it is better not to log, so that the database does not grow)
  • robots.txt -editing the robots indexing file (for search engines)
  • sitemap.xml -editing sitemap.xml file (for search engines). The setting is OUTDATED (data is now taken from the falcon_sitemap procedure)
  • globalJS-JS, which will be available to every page 
  • globalCSS styles that will be applied to each page
  • logoIcon-FontAwesome icon for the logotype at the top left 
  • ShowDebugInfo - if 1, JSON objects will be output to the browser console for the Form, table, Dashboard, and other components (regardless of the role) 

How to change layout elements (GetLayoutInfo settings)

To do this, change the procedure falcon_getLayoutInfo in the section System elements/System SQL.

The output of the first select (SELECT 1) has the following parameters: 

  • topNavbarText-markup in the upper panel (to the left of the search)
  • brand-site name (top left)
  • logoIcon - brand icon (top left), fa-dove by default. You can also specify the path - then the specified image will be output. 
  • leftFooterText-markup in the basement on the left, rightFooterText-markup in the basement on the right
  • footer-markup for the basement (if specified, leftFooterText and rightFooterText are ignored)
  • mobileFooter-marking the pinned strip at the bottom of the mobile;(does not replace the footer). Typical markup: 
<ul class="list-inline mt-2 text-center">
    <li class="list-inline-item px-3"><a href="#" title=""><i class="fa fa-2x fa-cube"></i></a></li>
    <li class="list-inline-item px-3"><a href="#" title=""><i class="fa fa-2x fa-star"></i></a></li>
    <li class="list-inline-item px-3"><a href="#" title=""><i class="fa fa-2x fa-bars"></i></a></li>
    <li class="list-inline-item px-3"><a href="#" title=""><i class="fa fa-2x fa-fire"></i></a></li>
  • userProfileLink - ссылка на профиль пользователя. Если заполнена - то показывается наверху справа в выпадающем списке. 
  • enableLang - если 1, то можно менять язык справа наверху (локализация)
  • defaultLang - можно установить язык по умолчанию (например, RU-ru en en-US). 
  • enableAnimation - включается анимация (появление заголовков, сообщение после сохранения формы, открытие модального окна).
  • enableGeolocation - если 1, то включает запрос разреения на геолокацию в браузере и сохранение страны пользователя. 
  • <ли стиль="шрифт-вес: 400;"><промежуток стиль="шрифт-вес: 400;">geolocationKey - ключ от Google GeolocationAPI для подключения скриптов геолокации на
  • leftSidebar - HTML разметка в левом сайдбаре, выводится для всех страниц.
  • hideLeftCol - если 1 то скрывается вся левая колонка с меню и лого на странице.
  • favicon-Fav favicon иконке
  • BalanceSum, BalanceLink, BalanceText, BalanceIcon - вывод вверху элементов по балансу пользователя (в целом можно любую другую информацию вывести здесь о текущему пользователе).  Bal Balancesum Не пустая строка (выводить можно и для неавторизованных пользователей). 
  • theme - topic title IMPORTANT! Do not specify the name of a non-existent theme here (SQL Management Studio). A theme is a file stored in a folder/uploads/Themes/{themecode}.
  • horizontalMenuOnTop. If 1, the horizontal menu is displayed in the upper bar of the header. If 0-then under the header. 
  • TopSubMenuText, TopSubMenuTitle - setting a large submenu at the top. Top  topsubmenutitle before searching and opens as a large panel with markup Topsubmenutext.
  • breadcrumbOnTop.  If 1-then breadcrumbs are displayed in the upper band of the header. If 0-then under the header. 
  • showSearch - If 1 the search is shown to the user. 
  • helpChatKey - if you specify the chat key (only the replay chat key for now), it will display the chat below to help the user.  replain:{id}. You can give different chats depending on the user's role. You can get the chat key at https://replain.cc/
  • dateFormat - sets the date output format, default DD.mm.yyyy on
  • phoneFormat - setting the default format for the phone + 1 (ddd) ddd DD-DD
  • fixWidth  - if 1, the page has a fixed width (container). By default, the page layout is not restricted (container-liquid). 
  • disableCart-if 1, the bucket element is not displayed in the site header.
  • cartCode-sets the bucket code for the element in the upper line (Data-code). 
  • bodyClass - if specified then the tag is added to the body of this class (necessary for more accurate CSS of system elements (for example, bread crumbs) for specific pages).
  • schemaTypeBody- schema micromarking Schema.org. If you specify Body Body Body (in general case it is possible to use http://schema.org/WebPage).
  • customMetaTags - custom settings for additional tags. By default there is the following: 
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="author" content="Falcon Space, Web-Automation.ru">
<meta name="theme-color" content="#cccccc">

The second query in GetLayout (SELECT 2) - this is horizontal menu.

Model SELECT 2: 

select 1
 select id Id,
	name Name,
	'' Title, a hint to the element
	code Url,
	'fa fa-cogs' CssClass, icon class
	0 isActive,
	parentID ParentID parent element (for a nested menu)
	from as_cat_categories

If no 2 query is specified, the menu is not output (this menu may not intersect with as_menu and pg_pages in any way and is built completely dynamically).

The third querry in GetLayout (SELECT 3) gives a list of quick add forms that can be opened from any page in the modal window. 


To do this, use the following model in SELECT 3: 


select * from  

    (select 'form' type,'Create the page' Title, 'newPage' Code, '' itemID, 'fa-plus'
     Icon, 'Create the page' btnText, 0 bigModal,  0 Ord
     select 'sp' type, 'Procedure GetLayout' Title, 'falcon' Code,'getLayoutInfo'
     itemID,  'fa-cube' Icon, '' btnText, 1 bigModal, 6 Ord
     select 'link' type,'Clearing the cache' Title, '/controls/stuff/clearcache' Code,''
     itemID, 'fa-trash' Icon, '' btnText, 0 bigModal,  500 Ord) t

Order by ord


When Type = form the modal form is called

  • Title-sets the name of the item in the list and the title of the modal window.
  • Code-modal form code
  • Icon-icon in the list
  • btnText-save Button in the modal window
  • bigModal - If 1, it makes the modal window large. 
  • slideout - If 1, the form will be in the form of a large window that extends to the left.

Working with forms

When Type = table the table in the modal window is called

  • Title-sets the name of the item in the list and the title of the modal window.
  • Code-table code
  • Icon-icon in the list
  • bigModal - If 1, it makes the modal window large. 
  • slideout - If 1, the table will be in the form of a large window that extends to the left.

Working with tables

When Type = link the button will work as a link and go to the address specified in the Code field. 

When Type = sp the button will work as a component of changing the stored procedure (as-sp-link component). 

In this case, Code specifies the first part (data-control), itemID specifies the second part (data-entity), and btnText specifies the third part of the name of the stored procedure (data-operation).

Note: if you don't need SELECT 2, you can just put Select '1'instead

The fourth request in GetLayout (SELECT 4) determines what will be displayed to the user in the service menu on the right (when clicking on the user icon).


if(@username='admin') begin

  select * from  

   (select '' Class,'My profile' Title, 'fa-user' Icon, '/user' Url, 0 Ord
    select '' Class,'Change password' Title, 'fa-key' Icon,
           '/admin/account/changepassword' Url, 1 Ord
    select '' Class,'Exit' Title, 'fa-sign-out-alt' Icon,
           '/account/logoff' Url, 2 Ord) t

    Order by ord 

  end else begin 

  select * from  

    (select '' Class,'Войти' Title, 'fa-user' Icon, '/account/login' Url, 0 Ord) t

  Order by ord 


Note. Sitelinks from SELECT 4 are available via hotkeys Ctrl + Alt + [Num]

The fifth GetLayout (SELECT 5) query defines labels that are output from menu items.

select '/tickets' Url, 'fa fa-edit' Icon, '12' Value, 'light' Type, '123' Title
select '/forms' Url, 'fa fa-edit' Icon, '' Value, 'success' Type, '123' Title

Using the Url, we find a menu item and add an element with the Icon Icon to it, to the right of the icon the Value value. The backing style is set by Type (secondary, light, success, etc.)

Settings web.config

These are special system settings that are stored in the web project configuration file in the appSettings section.

  • licenseKey-license key of the program instance
  • logUserAction - if 1, all controller/action
  • requests will be logged in as_trace
  • logChanges - if 1, all changes to stored procedures will be saved to the database
  • proxyUrl-address of the proxy for telegram (in the format
  • proxyUser-proxy user
  • proxyPassword-proxy password
  • telegramToken - token telegram. If not specified, the bot just wish more people would not start. 
  • telegramOnlyTextMessages - if 1, the telegram bot will only process text requests
  • disableAntiXSSRoles-list of roles that can send HTML to the server (protection from XSS attacks). 
  • catalogCacheMinutes - caching time in minutes for catalog output results (if 0, caching is not used)
  • listCacheMinutes - caching time in minutes for list output results (if 0, caching is not used)

Caching settings

In the system some objects are cached at the server level: 

  • user menu
  • directory output (the cache time is set in web. config. If 0, it is disabled).
  • issuing of lists list (the cache time is set in the web.config. If 0, it is disabled).
  • working with user roles
  • settings

The root prefix of all cache keys is as_ 

You can manually clear the cache in the Settings section. 

If you need to clean the cache after some action in the form, use the external action clearcache

select 'clearcache' type, 'as_' prefix

Additional settings

Launching periodic events

Universal site search

Mail settings

Falcon Space is a functional web development platform on a narrow stack MS SQL/Bootstrap. Falcon Space Gettting started