Sign Up

Custom Page Functions

Reusable custom page functions in Twidget enhance the development experience by allowing users to define and manage functions that operate specifically within the context of pages and page components. This capability is an integral feature for creating dynamic, interactive web applications without traditional coding.

-

Purpose

The primary purpose of reusable custom page functions is to promote modularity and reusability within page-specific actions and components. By allowing developers to create custom functions that can be easily invoked across various elements of a page, Twidget enables efficient workflow and reduces duplication of effort in function definition.

Key Concepts

  • Page Functions: These are functions specifically designed for use within pages or their components. Unlike API functions that can be globally accessed across the platform, page functions are scoped to individual pages.

  • Function Commands: While creating page functions, developers can add specific commands that allow interaction with the page’s context. This includes commands for manipulating page elements, interacting with local storage, and managing session data.

  • Element Action Integration: Custom functions can be integrated into page elements (like buttons) to define specific actions, further enhancing interactivity.

Main Components and Workflow

  1. Functions Page: Developers access the functions area through the functions page, where they can switch between API and page functions views.

  2. Create Function: Custom functions are created with a defined name, followed by specifying commands tailored to the page context.

  3. Command Categories: When adding commands, developers can choose from an extended set of options that includes unique categories relevant to page interactions.

  4. Using Custom Functions in Pages: Once defined, these functions can be seamlessly integrated into page elements, allowing for dynamic responses to user interactions.

  5. Interoperability: Custom functions can be utilized within other page functions, promoting further reusability and modular design.

This architecture ensures that developers can efficiently build robust web applications by leveraging specific, reusable functions tailored to their page contexts.

Related Topics

Page Components

Page components are reusable building blocks within the Twidget platform that enhance development efficiency by allowing users to create, manage, and implement consistent UI elements across multiple pages. They serve to encapsulate functionality and design into a single entity, which can be reused a...

Page Layouts

Page layouts in Twidget provide a structured way to organize and present content on a web page. The primary purpose of page layouts is to enhance user experience through effective content management and visual hierarchies. Key Concepts. - Header & Sidebar Layouts: These layouts subdivide the page in...

reCAPTCHA

Twidget integrates Google's reCAPTCHA, a security service designed to protect websites from spam and abuse by distinguishing between human and automated access. reCAPTCHA operates by requiring users to complete simple tasks, such as identifying objects in images or clicking a checkbox, thereby provi...

Access Query Parameters in a Page

This section details how to access and utilize query parameters within Twidget pages, enabling dynamic content and functionality based on user-supplied parameters. Key Concepts. - Query Parameters: A method to pass data to web pages through the URL, enabling dynamic content updates based on user int...

Upload a File using Pages

This documentation describes the functionality available in Twidget for uploading files through a generated API endpoint and managing interactions via pages. The process allows developers to create dynamic forms that enable users to upload files directly to the backend file storage, specifying vario...