Browse by topic

Discover Text

Explore related documentation through its most useful keyword groups.

1342 items

Grouped by Architecture

All Text

Models

template

Model for dynamic template rendering. It renders a template path passed in the request path and returns the rendered template output.

Actions

update

Updates the content of an HTML element with a template or a literal HTML text.

Actions

validation_error

Render a validation error on the target. Text is given in the text argument.

Filters

temporary_rsc

Creates a temporary resource if its input value is not defined.

Notifications

observe_acl_user_groups_modify/3

Modify the list of user groups of a user. Called internally by the ACL modules when fetching the list of user groups a user is member of.

Filters

exclude

Filters a list on the value of a property, either on absence or inequality.

Filters

truncate

Truncate a text to a maximum length.

Notifications

observe_rsc_upload/2

Upload and replace the resource with the given data. The data is in the given format.

Filters

log_format_stack

Escapes and formats a Javascript string with a stack trace to readable HTML.

Filters

striptags

Removes all HTML tags from the value.

Notifications

observe_comment_insert/2

Notification to signal an inserted comment. ‘comment_id’ is the id of the inserted comment, ‘id’ is the id of the resource commented on.

Notifications

observe_postback_notify/2

Handle a javascript notification from the postback handler. The message is the the request, trigger the id of the element which triggered the postback, and…

Filters

before

Return the first element before another element in a list. For example:

Notifications

observe_media_stillimage/2

See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or undefined

Controllers

controller_admin_backup

Shows the admin backup screen where you can download nightly backups that were made by module#mod_backup.

Notifications

observe_scomp_script_render/2

Add extra javascript with the {% script %} tag. (map) Used to let modules inject extra javascript depending on the arguments of the {% script %} tag. Must…

Validators

presence

Check if an input has been filled in or checked.

Controllers

controller_ping

Simple controller for connection tests, used on the /test/connection page.

Models

editor_tinymce

Model exposing TinyMCE editor version metadata used by admin/editor integration.

Filters

replace_args

Replace $N placeholders in string from a list of replacement values.

Filters

survey_is_stop

Check if there is a ‘stop’ question in list of (survey) blocks

Filters

normalize_email

Normalize an email address, used in the identity management.

Tags

ifnotequal

Show something if two values are not equal.

Notifications

observe_rsc_merge/2

Map to signal merging two resources. Move any information from the loser to the winner. The loser will be deleted.

Scomp

worker

Start a named Cotonic worker from a template.

Actions

config_delete

Trigger the deletion of a configuration value. Used in the admin.

Tags

media

Show embed, video or audio media.

Filters

in_future

Tests if a date is in the future.

Filters

survey_any_wrong_answer

Determine if any answer of a question was wrong. Used for showing results of thurstone test questions.

Tags

spaceless

Removes whitespace between HTML tags.

Tags

load

Loads the given custom tags for use in the templates. Normally not needed, as custom tags are automatically loaded through the module system.

Scomp

spinner

Add an AJAX activity indicator.

Tags

cache

Cache frequently used rendered template output for later reuse.

Validators

username_unique

Check if an entered username is unique by querying model#identity for the given username:

Filters

group_title_firstchar

Similar to filter#group_firstchar, but always uses the title column from the rsc table.

Modules

mod_linkedin

The mod_linkedin module plugs into the authentication system to enable LinkedIn login on your site.

Actions

editor_add

Add WYSIWYG editor controls to the textareas selected by the target. The active editor integration, such as TinyMCE, implements the actual controls; the action…

Filters

last

Returns the last character or element.

Actions

remove

Remove an element from the page.

Actions

config_toggle

Toggle a configuration value. Used in the admin, for instance when displaying a “live” checkbox the state of which should reflect a config value.

Tags

filter

Filter the contents of a block through variable filters.

Filters

is_number

Test if a value is a number (integer or floating point):

Models

microsoft

Check with useauth if the authentication using the Microsoft identity platform is enabled and configured.

Filters

md5

Translates a string to a md5 hex value.

Filters

add_hour

Adds an hour to a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Tags

all_include

Call all modules to include a certain template.

Tags

trans_ext

Translate a text value using gettext and substitute variables.

Filters

sha1

Translate a string to a sha1 hex value.

Actions

remove_class

Remove a CSS class from an HTML element.

Modules

mod_media_exif

When uploading a file, this module extracts properties from the uploaded media and sets them in the resource.

Actions

move

Move the target element by appending it to another element.

Notifications

observe_auth_logoff/3

User is about to log off. Modify (if needed) the logoff request context.

Filters

after

Return the first element after another element in a list. For example:

Models

email_status

Tracks the send/bounce/error status of all outgoing emails.

Modules

mod_cron

Provides periodic tick notifications and module-defined cron job scheduling.

Filters

match

Match a value with a regular expression.

Filters

element

Select an element from a tuple or list of tuples.

Filters

sanitize_html

Sanitize a HTML code. Removes elements and attributes that might be dangerous, like <script> elements.

Modules

mod_audio

Adds support for viewing and handling audio medium items.

Notifications

observe_identity_verification/2

Request to send a verification to the user. Return ok or an error. Handled by mod_signup to send out verification emails. Identity may be undefined, or is an…

Filters

is_a

Filter a list of resource ids on category, or test if a single resource id belongs to a category.

Filters

set_url_language

Change the language of an URL to another language. Useful to generate alternative URLs for a page.

Modules

mod_admin_frontend

Adds editing of resources, menu-trees and collections for non-admin users.

Filters

utc

Translates a datetime from local time to UTC.

Filters

ne_day

Tests if two dates are not equal.

Filters

content_type_label

Return a translated, human-readable label for a MIME content type.

Models

fileuploader

Model to start uploads, upload a block and delete uploads.

Filters

join

Joins the elements of a list. Joins the elements of the input list together, separated by the argument.

Actions

unmask

Removes a mask that was placed over an element using the action#mask action.

Controllers

controller_admin_category_sorter

Shows the admin category screen where you can edit the category tree, rearranging the categories, adding new categories, or removing existing ones.

Tags

now

Show the current date and time.

Notifications

observe_survey_result_column_values/3

Modify row with answers for export. The header columns are given and the values that are known are set in the folded value. The user_id is the user who filled…

Validators

email_unique

Check if an entered e-mail address is unique by querying model#identity for the email key:

Filters

group_by

Groups items of a list by a property.

Actions

submit

Submits the enclosing form, a specifically targeted form or the closest form to an element.

Actions

typeselect

Show possible selections whilst typing.

Actions

module_rescan

Rescans all modules, to find all templates, lib files, dispatch rules, etc. again.

Actions

dialog_mail_page

Shows the dialog to mail the current page ( resource) to a single e-mail address. This is used in the frontend of a site to “share” the current page over e

Modules

mod_seo

Adds basic search engine optimization to the base templates and provides an admin interface for configuring SEO options and Google Universal Analytics.

Notifications

observe_signup_failed_url/2

Signup failed, give the error page URL. Return {ok, Url} or undefined. Reason is returned by the signup handler for the particular signup method (username