Documentation
Browse by topic
Explore related documentation through its most useful keyword groups.
1435 items
Grouped by Architecture
A named transformation applied to a value inside a template expression.
Explore this clusterA typed event or request exchanged between decoupled Zotonic components through the notifier.
A namespaced interface for retrieving or changing data and invoking operations in Zotonic or browser-side components.
Explore this clusterAn OTP application or site component that adds Zotonic behavior templates data and configuration.
Explore this clusterA server-defined browser action or event binding connected through Zotonic wires.
Explore this clusterA server-side template_compiler document that renders data into HTML text email or another representation.
Explore this clusterA request handler that maps web requests to responses and coordinates authorization rendering or data transfer.
Explore this clusterA route declaration that matches a URL pattern and selects a controller with arguments.
Explore this clusterThe central Zotonic entity that represents content users media categories and other addressable objects.
Explore this clusterDocumentation not covered by the other keyword groups in this split.
Explore this clusterNotify that a user’s identity has been verified. Signals to modules handling identities to mark this identity as verified. Handled by mod_admin_identity to…
Find an import definition for a CSV file by checking the filename of the to be imported file.
Import a prepared external resource instead of its default importer.
Notify that the session’s language has been changed
Try to detect the language of a translation. Set is_editable_only to false to detect any language, even if the language is not enabled for the site. Return…
Check for logon options, called if logon_submit returns undefined. This is used to fetch external (or local) authentication links for a username. Return:: map()
Check where to go after a user logs on.
Handle a user logon. The posted query args are included. Return:: {ok, UserId} or {error, Reason}
Send a page to a mailinglist (notify) Use {single_test_address, Email} when sending to a specific e-mail address.
Send a welcome or goodbye message to the given recipient. The recipient is either a recipient-id or a recipient props. ‘what’ is send_welcome, send_confirm
Site configuration parameter was changed
Site configuration parameter was changed
Try to find a filename extension for a mime type (example: <<".jpg">> )
Try to identify a file, returning a map with file properties.
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue movies for conversion to mp4. You can set…
Notification to import a medium record from external source. This is called for non-file medium records, for example embedded video. If the medium record is…
Modify the options for an image preview url or tag. This is called for every image url generation, except if the ‘original’ image option is passed. The…
Contribute normalized resource edit settings to the signed preview revision. Return a list with {Module, Settings} prepended to the accumulator. Contributions…
Notification that a medium file has been changed (notify) The id is the resource id, medium contains the medium’s complete property map.
See if there is a ‘still’ image preview of a media item. (eg posterframe of a movie) Return:: {ok, ResourceId} or undefined
Media update done notification. action is ‘insert’, ‘update’ or ‘delete’
Notification to translate or map a file after upload, before insertion into the database Used in mod_video to queue movies for conversion to mp4. You can set…
Notification that a medium file has been uploaded. This is the moment to change properties, modify the file etc. The folded accumulator is the map with updated…
Notification that a medium file has been uploaded. This is the moment to change resource properties, modify the file etc. The folded accumulator is the map…
Request to generate a HTML media viewer for a resource. The HTML data can not contain any Javascript, as it might be serialized. This could happen if the…
Optionally wrap HTML with external content so that it adheres to the cookie/privacy settings of the current site visitor. Typically called with a ‘first’ by…
Fetch the menu id belonging to a certain resource
Save the menu tree of a menu resource
Delegates the request processing.
A module has been activated and started.
A module has been stopped and deactivated.
Signals that the active modules or their indexed templates, actions, models, and other components have changed.
Fold for mapping non-iolist output to iolist values.
Fetch the url of a resource’s html representation
Foldr to change or add pivot fields for the main pivot table. The rsc contains all rsc properties for this resource, including pivot properties. Fold with a…
Fold over the resource props map to extend/remove data to be pivoted
Pivot just before a m_rsc_update update. Used to pivot fields before the pivot itself.
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…
Refresh the context or request process for the given request or action
Let all modules add resource specific response headers to the request. The accumulator is the list of headers to be set.
Resource will be deleted. This notification is part of the delete transaction, it’s purpose is to clean up associated data.
Extend the full resource-export envelope returned by m_rsc_export:full/2 . The accumulator is the export map, not the nested resource-properties map. Return…
Resource is read, opportunity to add computed fields Used in a foldr with the read properties as accumulator.
Convert raw stored resource data to its current representation.
A resource import has completed. The options describe this particular import; recursively imported resources can have different options.
Fetch the data for an import of a resource. Returns data in the format used by m_rsc_export and m_rsc_import. Either returns the JSON data, the imported…
Enrich the decoded resource-export envelope with import metadata. The response headers belong to final_url , after any redirects. Return the updated envelope.
Foldr for a resource insert, these are the initial properties and will overrule the properties in the insert request. Use with care. The props are the…
Map to signal merging two resources. Move any information from the loser to the winner. The loser will be deleted.
Signal that a resource pivot has been done.
Send a notification that the resource ‘id’ is added to the query query_id.
An updated resource is about to be persisted. Observe this notification to change the resource properties before they are persisted.
An updated resource has just been persisted. Observe this notification to execute follow-up actions for a resource update.
Upload and replace the resource with the given data. The data is in the given format.
Sanitize an HTML element.
Sanitize an embed url. The hostpart is of the format: <<"youtube.com/v...">> .
Add extra javascript with the {% script %} tag. (map) Used to let modules inject extra javascript depending on the arguments of the {% script %} tag. Must…
Map a custom search term to a #search_sql_term{} record.
Normalize a search value for queries and indexing. An example is the normalization of texts by transliteration and removal of accents. Defaults for text values…
Map a custom search term to a #search_sql_term{} record.
Check and possibly modify the http response security headers All headers are in lowercase.
Refresh the context or request process for the given request or action
Set the language of the context to a user’s prefered language
Request a signup of a new or existing user. Arguments are similar to #signup_url{} Returns {ok, UserId} or {error, Reason}
signup_check Check if the signup can be handled, a fold over all modules. Fold argument/result is {ok, Props, SignupProps} or {error, Reason}
Signal that a user has been confirmed. (map, result is ignored)
Fetch the page a user is redirected to after signing up with a confirmed identity
Signal that a user has been signed up (map, result is ignored)
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
Handle a signup of a user, return the follow on page for after the signup. Return {ok, Url} ‘props’ is a map with properties for the person resource (email
Request the SSL certificates for this site. The server_name property contains the hostname used by the client. (first) Returns either ‘undefined’ or a list of…
Fetch list of handlers for survey submits.
Check if the current user is allowed to download a survey.
Check if a question (page block) is a submitting question.
Add header columns for export. The values are the names of the answers and the text displayed above the column. The text format is for a complete export, the…
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…
A survey has been filled in and submitted.
Delete a value from the typed key/value store
Get a value from the typed key/value store
Put a value into the typed key/value store
Request a translation of a list of strings. The resulting translations must be in the same order as the request. This notification is handled by modules that…
Make a generated URL absolute, optionally called after url_rewrite by z_dispatcher
Determine the URL fetch options for fetching the content of an URL. Used by z_fetch.erl.
Rewrite a URL after it has been generated using the z_dispatcher
Set #context fields depending on the user and/or the preferences of the user.
Check if a user is enabled. Enabled users are allowed to log in. Return true , false or undefined . If undefined is returned, the user is considered enabled if…
Called just before validation of all query arguments by z_validation.
Open the site URL in a browser.
Closes the currently open overlay. When there is no overlay open then nothing happens.
Renders a template on the server and opens a full screen overlay with the HTML output of the template.
Find the active template and its path relative to priv/templates. Create the same relative path in your site or another active module with a higher selection…
Inherit markup from like named template in another module.
Cotonics main functions are available in the cotonic namespace on the main page. The functions are mostly used to control and allow messaging…
A validator to check whether a resource’s page path is unique:
Show a pager for search results.
Understand why people, images, and articles share an editor.
Write a useful title and description for search and sharing.
Parses an URL (URI) using uri_string:parse/1 .
Pickle an Erlang value so that it can be safely submitted with a form.
Search uses database indices on special pivot columns and full text fields.