CMS installation

Embedding Custom Code in cmsTCpro (Instruction)

The cmsTCpro system provides developers with two levels of custom code integration: from simple injections to complex dynamic modules. This allows you to connect any payment gateways, analytics systems, and interactive widgets without modifying the CMS core.

Important: Unlike React-based versions, this system utilizes Blazor .NET 10 technology, ensuring a direct link between server-side logic and client-side JavaScript via JS Interop mechanisms.

Method 1: Global Injections (Config Panel)

The fastest way to connect external services (Google Analytics, Yandex Metrica, JivoSite, etc.).

  • Go to Administration -> Config.
  • Use the Basket field to insert HTML markup (e.g., buttons or containers).
  • Use the Script3 field to insert pure JavaScript code.

Note: Code from these fields is automatically loaded onto active pages and executed in the user's browser context.

Method 2: Dynamic JS Modules (Active Pages)

To create complex interfaces (e.g., a custom cart or user dashboard), use isolated modules.

  1. Create a file named my_module.js in the wwwroot/js-modules/ directory on your server.
  2. Define the module logic using function export:
    export function initModule(element, data) {     element.innerHTML = "<h3>Module active for: " + data.userName + "</h3>";     // Your logic goes here (Stripe, PayPal, API) }
  3. The module will automatically be available at: /module-view/{Area}/my_module.

Security and Access

All active pages in cmsTCpro are protected by the [Authorize] attribute by default. This ensures that your custom code (e.g., a payment form) is only visible to authorized clients, and user data (userName, email) is securely passed to your script from the system.

For additional code examples or consultations regarding the cmsTCpro API, please contact technical support at tutocito.com.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.