Browse by topic

Discover Documentation

Explore related documentation through its most useful keyword groups.

1031 items

Grouped by Architecture

All Documentation

Filters

chunk

This filter splits a list in shorter lists. It splits an array in sub-arrays of at most a given length. This is useful when displaying a list of items in…

Models

clamav

Reports whether the ClamAV daemon ( clamd ) is available. The m.clamav.is_available model path sends a ping and returns true when the daemon responds with PONG…

User guide

CMS

Zotonic is a Content Management System (CMS).

Reference

Command-line

The zotonic command runs a number of utility commands which all operate on a Zotonic instance.

Developer guide

Command-line shell

The Zotonic shell gives you access to a running Zotonic instance with its code and data.

Models

comment

Model for comments attached to resources. It provides listing, moderation checks, counting, and retrieval of individual comments.

Tags

comment

Ignore part of a template.

Tags

compose

Compose another template and override its named blocks.

Models

config

Zotonic has two places where a site's configuration is kept:

Actions

config_delete

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

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.

Reference

Configuration

Global configuration Site configuration Port configurations

Actions

confirm

Show a JavaScript confirm message and on confirmation triggers one or more actions and/or sends a postback to the server.

Models

content_group

Model for content-group checks, currently exposing whether a content group is in use.

Filters

content_type_label

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

Filters

content_type_urls

Return the available content representations and URLs for a resource.

Developer guide

Contributing to Zotonic

We encourage contributions to Zotonic from the community! This chapter describes how you can help improve Zotonic.

Controllers

controller_admin

The admin controller is the main controller behind which admin pages are served. Its main purpose is that it does an authentication check (Is current user…

Controllers

controller_admin_backup

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

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.

Controllers

controller_admin_comments

Shows an admin screen with an overview of most recently created comments. The screen offers the option to moderate the comments or delete them entirely.

Controllers

controller_admin_config

Shows the admin config editor. Here you can edit the key/value pairs of model#config.

Controllers

controller_admin_edit

The main admin edit controller. This controller serves the edit page where resources can be edited.

Controllers

controller_admin_mailinglist_recipients

Shows the recipients of the current mailing list. The recipients are listed in three columns, and have a checkbox next to them to deactivate them.

Controllers

controller_admin_mailing_status

This controller shows the mailing status of a resource. It lists each mailing list available in the system, and shows whether or not the current resource has…

Controllers

controller_admin_media_preview

A controller for rendering preview thumbnails of any media embedded in a richtext-editor component of a resource on the controller#controller_admin_edit page.

Controllers

controller_admin_seo

Shows a form with settings related to Search Engine Optimization.

Controllers

controller_api

controler_api processes authorized REST API requests: It provides an easy way to create API calls to allow computer programs to perform functions on your…

Controllers

controller_authentication

This controller manages all authentication cookies. It is called by the auth model in the browser.

Controllers

controller_file

Serve an uploaded-, resized- or library file.

Controllers

controller_id

Handle different content representations of a page.

Controllers

controller_language_set

Controller which sets the language as given in the code argument, and redirects the user back to the page given in the p argument.

Controllers

controller_logoff

Controller that logs off a user, destroying the session. It also removes any “remember me” cookies the user has, so that auto-logon is disabled.

Controllers

controller_logon_done

This controller is used as a jumping stone after a log on from the /logon page. The p argument is passed from the /logon page.

Controllers

controller_media_runner_callback

Client-side receiver for results produced by the external media runner site. This controller belongs to mod_base , so each client site has a callback endpoint…

Controllers

controller_ping

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

Developer guide

Controllers

Controllers are the Erlang modules which decide what happens when a browser requests a page. Zotonic looks at the dispatch rules that match the requested URL

Controllers

controller_signup

Controller which displays a form to sign up (rendered from signup.tpl ).

Controllers

controller_signup_confirm

Controller which displays the confirmation page where the user can confirm his signup.

Controllers

controller_websub

HTTP hub and subscriber callback controller for mod_websub .

Controllers

controller_websub_topic

Serve the complete JSON representation advertised as a resource's WebSub topic.

Models

copyright

Model for copyright and rights metadata helpers, including Creative Commons lists, rights statement lookup, and attribution/year values.

Cookbook

Create a custom controller

Zotonic comes with a large collection controllers that cover many use cases, so you’ll probably have to resort to custom controllers less often than you may be…

Cookbook

Create a custom filter

Create custom template filters to change the way variables are rendered in your templates. By following some simple rules, Zotonic will automatically find the…

Cookbook

Create a custom model

In this chapter we will look at how to implement a model around the The Open Movie Database (OMDB) API.

Cookbook

Create a custom tag

Custom tags, internally called scomps , are module-defined tags, which are used when the logic is too complex to be executed in templates.

Developer guide

Creating sites

Initialize your site with a proper data model and some resources through manage_schema .

Developer guide

CSS classes used in templates

If you are building a website then you might want to use the standard dialogs, overlays, authentication and other parts of Zotonic. To make those look like…

Validators

custom

Support for custom client-side (JavaScript-based) validators.

Cookbook

Custom pivots

Search can only sort and filter on resources that actually have a database column. Zotonic’s resources are stored in a serialized form. This allows you to very…

Models

custom_redirect

Model for custom redirect records, exposing redirect list and individual redirect lookup by id.

Cookbook

Custom search

Implement a custom search by observing the search_query notification in your module. Imagine you want to search cookies in your database that either have…

Tags

cycle

Rotate through a list of values.

Filters

date

Formats a date or datetime according to the format specified in the argument.

Validators

date

Validate input date against a given date format.

Filters

datediff

Calculate the difference between two dates, returning a single part of that difference.