Text
This controller shows the mailing lists that are available in the system.
controller_admin_mailing_status
This controller shows the mailing status of a resource. It lists each mailing list available in the system, and shows…
Shows the admin config editor. Here you can edit the key/value pairs of m_config.
controller_admin_comments_settings
Shows an admin settings screen where you can edit settings related to mod_comment.
Shows an admin screen with an overview of most recently created comments. The screen offers the option to moderate the…
controller_admin_backup_revision
Shows the admin backup revisions screen where you can see older version for a resource.
Shows the admin backup screen where you can download nightly backups that were made by mod_backup.
Simple controller that always serves the string Hello, World!
Template Best Practices and Pitfalls
This chapter lists some preferred solutions to common tasks and pitfalls you may encounter while developing with…
HTML escapes a text.
Logs messages to the database and adds log views to the admin.
Dispatch rules Name Path Resource Args admin_log [“admin”,”log”] controller_admin [{template,”admin_log.tpl”}
auth_checked auth_confirm auth_confirm_done auth_client_logon_user auth_client_switch_user auth_logon auth_logoff…
This controller manages all authentication cookies. It is called by the auth model in the browser.
Use Media classes to define image properties.
Dispatch rules Name Path Resource Args admin_category_sorter [“admin”,”category”] controller_admin_category_sorter…
Action module which provides postback handlers for the “status” view of the admin:
admin_tasks redirect_incat
Selects an argument depending on a condition.
Tests if a value is undefined.
Tests if a value is defined.
Tests whether a value is undefined, returning the given argument.
Filters a list on the value of a property, either on absence or inequality.
The m_search model provides access to different kinds of search queries for searching through models.
This filter splits a list in shorter lists. It splits an array in sub-arrays of at most a given length. This is useful…
Add support for editing Categories in the admin, by presenting an editable category tree at http://yoursite.com/admin…
controller_admin_category_sorter
Shows the admin category screen where you can edit the category tree, rearranging the categories, adding new categories
These variables are always available for rendering in templates.
Dispatch rules Name Path Resource Args admin [“admin”] controller_admin [seo_noindex] admin_logon [“admin”
First for logon of user with username, check for ratelimit, blocks etc.
Escapes the value for insertion in JSON output.
Escapes the value for insertion in JavaScript output.
Update the given (accumulator) authentication options with the request options. Note that the request options are from…
Show the admin dialog for creating a new resource.
Converts a text into a slug.
Dispatch rules Name Path Resource Args admin_seo [“admin”,”seo”] controller_admin_seo [seo_noindex]…
Test if a hostname can be used for a Let’s Encrypt certificate.
A survey has been filled in and submitted.
Render a validation error on the target. Text is given in the text argument.
development_templates_stream
Not yet documented.
Replace $N placeholders in string from a list of replacement values.
Dispatch rules Name Path Resource Args admin_modules [“admin”,”modules”] controller_admin_module_manager…
Handle a javascript notification from the postback handler. The message is the the request, trigger the id of the…
Adds editing of resources, menu-trees and collections for non-admin users.
Dispatch rules Name Path Resource Args admin_frontend_edit [“edit”] controller_page [{acl,is_auth},{template
Perform array-slice operations on a list or string.
Zotonic is a Content Management System (CMS).
Dispatch rules Name Path Resource Args admin_auth2fa_config [“admin”,”authentication-2fa”] controller_admin [{ssl
Try to find the site for the request Called when the request Host doesn’t match any active site.
Notify that we could NOT send an e-mail (there might be a bounce later…) The Context is the depickled z_email:send/2…
Apply actions with arguments added.
with_args
Set the value of a form field.
Provides periodic events.
Show a boolean value as a text.
yesno
Toggle an element by sliding it up and down.
Sanitize an embed url. The hostpart is of the format: <<"youtube.com/v...">> .
group_firstchar group_title_firstchar is_a is_not_a is_visible
Try to find a filename extension for a mime type (example: “.jpg”)
Reverse a list.
Handle an uploaded file which is part of a multiple file upload from a user-agent. The upload is a #upload record or a…
Not yet documented.
Resource is read, opportunity to add computed fields Used in a foldr with the read properties as accumulator.
This action executes JavaScript directly. It can be used to interface with non-Zotonic JavaScript libraries and…
Fold for mapping non-iolist output to iolist values. Used when outputting a rendered HTML tree. Folded accumulator is:…
Foldr for an resource insert, these are the initial properties and will overrule the properties in the insert request.
The m_acl model gives access the id of the currently logged in user, and provides a mechanism to do basic access…
Cancel a mailing list subscription. The recipient id is given with the id argument.
Post a message to the test mailing list, given with the id argument.
Shows the dialog to mail the current page ( resource) to a mailing list. This is used in the admin “mailing status”…
Shows the dialog to mail the current page ( resource) to a single e-mail address. This is used in the frontend of a…
dialog_mail_page dialog_mailing_page mailing_page_test mailinglist_confirm mailinglist_unsubscribe
Implements a basic contact form, which gets emailed to the configuration value mod_contact.email , when submitted.
It is possible to put Zotonic behind the nginx <http://nginx.org/> web server, for example if you have other, non
Running on Port 80 and Port 443
Using standard ports helps visitors discover your page and removes the awkward port number from URLs.
Not yet documented.
Delete a resource, without confirmation.
mod_export - Fetch the header for the export.
mod_export - Fetch the footer for the export. Should cleanup the continuation state, if needed.
mod_export - return the {ok, Filename} for the content disposition.
mod_export - Encode a single data element.
mod_export - fetch a row for the export, can return a list of rows, a binary, and optionally a continuation state.
export_resource_content_disposition
mod_export - return the {ok, Disposition} for the content disposition.
An external feed delivered a resource. First handler can import it. Return:: {ok, m_rsc:resource_id()} , {error
Find an import definition for a CSV file by checking the filename of the to be imported file.
import_csv_definition import_resource export_resource_content_disposition export_resource_content_type…
Enables redirects from unknown hosts and paths to other locations. The other location can be a known path or another…
Not yet documented.
Not yet documented.
Not yet documented.
Used to map IP addresses to geographical locations.
Maps an IP address to a country using the MaxMind GeoIP2 database.
Centers the value in a field of a certain width using spaces.
Justifies the value in a field of a certain width to the right, using spaces.