mod_base

See also

dispatch rules.

mod_base is the base module, which acts as a container module holding most of Zotonic basic dispatch rules, Actions and Module tags.

Note that the amount of templates has been kept to a minimum in this module, so that sites are free to implement whatever templates they want.

Todo

Add more documentation

Edit on GitHub

Models

mqtt_ticket

A ticketing system for out of band MQTT posts via HTTP.

Controllers

controller_file_id

Redirect to the controller controller_file.

controller_http_error

This controller is called for serving http error pages.

controller_id

Handle different content representations of a page.

controller_mqtt_transport

Controller for transport of MQTT data between the browser (client) and server.

controller_page

Show a rsc as a HTML page.

controller_ping

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

controller_redirect

Redirect to another url.

controller_static_pages

Serve a static page or pages.

controller_template

Show a template.

controller_website_redirect

This controller does a redirect to the website property of the given resource.

Dispatch rules

dispatch

Dispatch rules Name Path Resource Args id [“id”,id] controller_id [] lib [“lib”,’*’] controller_file [{root

dispatch-cotonic

Dispatch rules Name Path Resource Args mqtt_transport [“mqtt-transport”] controller_mqtt_transport []…

dispatch-test

Dispatch rules Name Path Resource Args initial_test [“test”,”initial_postback_test”] controller_template…

Filters

add_day

See also

add_hour

See also

add_month

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

add_week

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

add_year

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

after

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

append

See also

as_atom

Convert a value to an Erlang atom.

before

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

capfirst

See also

center

See also

chunk

See also

date

See also

datediff

See also

date_range

See also

default

See also

Scomp

chart_pie

Show a pie chart.

chart_pie3d

Show a pie chart with 3D effect.

debug

Shows which variables are assigned for use in the current template’s scope:

google_chart

Make charts with Google.

inplace_textbox

Render a JS-aided inplace textbox.

lazy

Custom tag which adds a ‘loader’ image to the page and performs a one-time action when loader comes into view.

loremipsum

Inserts a piece of “lorem ipsum” text into the page.

pager

Show a pager for search results.

spinner

Add an AJAX activity indicator.

tabs

Make a HTML element into a tab set.

Validators

acceptance

See also

custom

See also

date

Validate input date against a given date format.

email

See also

format

See also

json

Todo

length

See also

name_unique

See also

postback

See also

presence

See also

See also

All dispatch rules

All the dispatch rules from all modules. For a background on dispatch rules, see The URL dispatch system.

Dispatch rules

Dispatch rules route incoming requests to controllers.

Referred by

Enabling Growl Notifications

Using growl outside admin requires some magic to make it work.

Controllers

Controllers are the Erlang modules which decide what happens when a browser requests a page. Zotonic looks at the…

All dispatch rules

All the dispatch rules from all modules. For a background on dispatch rules, see The URL dispatch system.

Dispatch rules

Dispatch rules route incoming requests to controllers.