Browse by topic

Discover Text

Explore related documentation through its most useful keyword groups.

1021 items

Grouped by Architecture

All Text

Validators

json

Validate that a form value is JSON.

Actions

unlink

Remove an edge between two resources. Used in the admin.

Notifications

observe_mailinglist_message/2

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

Filters

index_of

Returns the index of the first occurrence of the item in the given list.

Models

oauth2_consumer

Model for OAuth2 consumer configuration and token access, including consumer lists and per-consumer token retrieval.

Models

category

This model can retrieve information about the resource category hierarchy in different ways.

Tags

all_catinclude

Include a template for all a resource’s categories from all modules.

Filters

urlencode

Make a text safe for URLs.

Modules

mod_custom_redirect

Enables redirects from unknown hosts and paths to other locations. The other location can be a known path or another web site.

Filters

upper

Translates the value to upper case.

Actions

zmedia_has_chosen

Used by the admin as a callback when a media file has been selected for insertion into the rich-text editor.

Filters

group_firstchar

Group a list of sorted model#rsc resource IDs on their first letter of the title or another resource property. After grouping, it splits this list in a number…

Scomp

script

This tag is the placeholder where all generated JavaScript scripts will be output on the page.

Actions

alert

Show an alert dialog.

Filters

menu_trail

Return a breadcrumb navigation trail for the given id.

Actions

enable

Resets the “disabled” attribute of a HTML tag and removes the CSS class “disabled”.

Filters

if

Selects an argument depending on a condition.

Filters

first

Returns the first character or element.

Notifications

observe_edge_insert/2

An edge has been inserted. Note that the Context for this notification does not have the user who created the edge.

Models

oauth2

Model for OAuth2 app/client/token administration and user token listings.

Filters

menu_subtree

Get the subtree of an id in a menu (if any).

Scomp

mailinglist_subscribe

Show the mailinglist subscription form to subscribe to a certain mailinglist id.

Actions

delete_media

Delete a media file from a resource, without confirmation.

Models

l10n

Model for localization helpers, including countries, country names, available timezones, and site timezone settings.

Filters

sanitize_url

Sanitize an URL. Removes URLs that might be dangerous, like javascript: URLs.

Filters

sub_year

Subtracts a year from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Filters

linebreaksbr

Translate ASCII newlines ( \n ) into HTML <br /> elements.

Models

backup_revision

Model for resource revision backup metadata, including revision list/title retrieval and revision retention settings.

Filters

eq_day

Tests if the value is a date and equal to the argument. The value and the argument must be a tuple of the format {Y,M,D} or {{Y,M,D},{H,I,S}} .

Filters

date

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

Reference

The addsite command

Adding a site to Zotonic is done through the zotonic shell command. It syntax is like this:

Modules

mod_site_update

This module pulls updates of a site‘s code from a remote version control system. The supported version control systems are git and mercurial.

Actions

mask

Places a mask over an element, useful for blocking user interaction during lengthy postbacks.

Notifications

observe_custom_pivot/2

Add custom pivot fields to a resource’s search index (map) Result is a single tuple or list of tuples {pivotname, props} , where “pivotname” is the pivot…

Models

tkvstore

Simple read-only interface to the typed key-value store of module#mod_tkvstore. To get a value from the store: use m.tkvstore.type.key, like this:

Scomp

wire_args

Add extra arguments to wired actions.

Notifications

observe_resource_headers/3

Let all modules add resource specific response headers to the request. The accumulator is the list of headers to be set.

Filters

vsplit_in

This filter splits a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is useful when displaying a list of items in…

Filters

make_list

Forces the value to a list.

Modules

mod_facebook

The mod_facebook module plugs into the authentication system to enable Facebook login on your site.

Controllers

controller_admin_config

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

Actions

disable

Sets the “disabled” attribute of a HTML tag and adds the CSS class “disabled”.

Filters

is_list

Test if a value is a list:

Models

log_email

Model for email log lookups used by logging/admin views.

Modules

mod_admin_predicate

Add support for editing predicates in the admin, by presenting a list of all defined predicates on http://yoursite.com/admin/predicate .

Notifications

observe_media_import_medium/2

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…

Modules

mod_microsoft

Adds logon using the Microsoft identity platform.

Filters

language_dir

Return rtl or ltr depening on the direction of the language.

Models

seo

Model for SEO-related settings and generated SEO metadata, including webmaster verification keys, analytics settings, and JSON-LD output.

Notifications

observe_activity_send/2

Push a list of activities via a ‘channel’ (eg ‘email’) to a recipient. The activities are a list of #activity{} records.

Filters

add_day

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

Scomp

sortable

Mark an element as sortable.

Models

survey

Model for survey reporting and participant state, including results, totals, per-user answers, exports, and result handlers.

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.

Models

admin_blocks

Model for listing editable content blocks for a resource in the admin interface.

Models

req

This model gives access to the request variables from within a template.

Tags

for

Loop over multiple values in a list or search result.

Filters

sub_day

Subtracts a day from a date. The value must be of the form {{Y,M,D},{H,I,S}} .

Actions

insert_after

Insert rendered HTML immediately after the target element.

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.

Models

development

Model for development and diagnostics controls, including tracing flags, observer lists, cache/compile/reindex actions, and dispatch info.

Filters

rand

Generates a random number. The number is from, and including, 1 up to, and including, the input value.

Scomp

chart_pie3d

Deprecated compatibility alias for chart_pie.

Filters

round

Round a floating point value to the nearest integer.

Tags

catinclude

Include another template based on the category of a resource. The include tag is replaced with the contents of the included template file. You can give…

Scomp

droppable

Mark an element as valid drag destination.

Filters

without_embedded_media

Filter out media ids that are embedded in the body , body_extra and text blocks of your page.

Actions

overlay_close

Closes the currently open overlay. When there is no overlay open then nothing happens.

Notifications

observe_signup/2

Request a signup of a new or existing user. Arguments are similar to #signup_url{} Returns {ok, UserId} or {error, Reason}

Models

comment

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

Models

content_group

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

Actions

overlay_open

Renders a template on the server and opens a full screen overlay with the HTML output of the template.

Models

rsc

The main resource model, which is the central part of the Zotonic data model. This model provides an interface to all resource ("page") information. It also…

Tags

image

Show a still image using an <img\> element. The image will be automatically resized to the desired size and filters. For video, use the tag#media tag instead.

Notifications

observe_debug/2

Push some information to the debug page in the user-agent. Will be displayed with io_lib:format(“~p: p n”, [What, Arg]), be careful with escaping information!

Models

facebook

Model for Facebook integration helpers, including auth-use flag, profile picture fetch, and Graph API proxy calls.

Modules

mod_admin_config

Add support for editing the site’s configuration values, as accessed through model#config.

Actions

slide_fade_in

Show an element by animating the height and opacity.