Modules
The following pages explain each module of the 0.1 theme and describe how exactly you can use it.
The following pages explain each module of the 0.1 theme and describe how exactly you can use it.
Follow these steps to place a calendar:
cal_default (normal calendar)cal_mini (mini calendar)mod_calendar_zeroone (template settings)Follow these steps to place an event list:
event_teaser_zeroone (event list with images)event_list_zeroone (event list without images)event_upcoming (simple event list with date and title only)mod_eventlist_zeroone (template settings)Follow these steps to place the event reader (detail view):
event_full_zeroone (template settings)When you create a form, select the form template form_wrapper_zeroone in the form settings under
Template settings.
The 0.1 theme also includes more templates for form fields, which you select in the respective elements under template settings if the fields should look like in the theme demo.
Checkbox menu:
form_checkbox_zeroone: stackedform_checkbox_inline_zeroone: side by sideRadio button menu:
form_radio_zeroone: stackedform_radio_inline_zeroone: side by sideSubmit field:
form_submit_zerooneSelect mod_login_zeroone under template settings so that the login form is already styled to match the theme.
To show the form with placeholders only, select the template mod_login_placeholder_zeroone.
Select mod_changePassword_zeroone under template settings so that the module is already styled to match the theme.
Select mod_lostPassword_zeroone under template settings so that the module is already styled to match the theme.
Select member_zeroone or member_grouped_zeroone under template settings so that the registration form is already styled to match the theme.
Select member_zeroone or member_grouped_zeroone under template settings so that the personal data form is already styled to match the theme.
To show form fields in a simple form or registration form with placeholders only and without labels, you have to override the templates. In the left navigation, select Templates under Layout and duplicate the corresponding template with the button New template.
Text field:
form_textfield.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<input type="<?= $this->type ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text<?php if ($this->hideInput): ?> password<?php endif; ?><?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="<?= Contao\StringUtil::specialchars($this->value) ?>"<?= $this->getAttributes() ?><?php if ($this->label): ?> placeholder="<?= $this->label ?><?php if ($this->mandatory): ?> *<?php endif; ?>"<?php endif; ?>>
<?php $this->endblock(); ?>Select field:
form_select.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<?php if ($this->multiple): ?>
<input type="hidden" name="<?= '[]' == substr($this->name, -2) ? substr($this->name, 0, -2) : $this->name ?>" value="">
<?php endif; ?>
<select name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="<?= $this->class ?>"<?= $this->getAttributes() ?>>
<?php foreach ($this->getOptions() as $option): ?>
<?php if ('group_start' == $option['type']): ?>
<optgroup label="<?= $option['label'] ?>">
<?php endif; ?>
<?php if ('option' == $option['type']): ?>
<?php if($option['value'] == '') $option['label'] = $this->label; ?>
<option value="<?= $option['value'] ?>"<?= $option['selected'] ?>><?= $option['label'] ?></option>
<?php endif; ?>
<?php if ('group_end' == $option['type']): ?>
</optgroup>
<?php endif; ?>
<?php endforeach; ?>
</select>
<?php $this->endblock(); ?>Password field:
form_password.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<input type="password" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="text password<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" value="" autocomplete="new-password"<?= $this->getAttributes() ?><?php if ($this->label): ?> placeholder="<?= $this->label ?><?php if ($this->mandatory): ?> *<?php endif; ?>"<?php endif; ?>>
<?php $this->endblock(); ?>Textarea:
form_textarea.html5
<?php $this->extend('form_row'); ?>
<?php $this->block('field'); ?>
<?php if ($this->hasErrors()): ?>
<p class="error"><?= $this->getErrorAsString() ?></p>
<?php endif; ?>
<textarea placeholder="<?= $this->label ?>" name="<?= $this->name ?>" id="ctrl_<?= $this->id ?>" class="textarea<?php if ($this->class): ?> <?= $this->class ?><?php endif; ?>" rows="<?= $this->rows ?>" cols="<?= $this->cols ?>"<?= $this->getAttributes() ?>><?= $this->value ?></textarea>
<?php $this->endblock(); ?>In the 0.1 theme, the mega menu is available from version 1.13.0 (for Contao 4) or 2.3.0 (Contao 5).
You find an example of what it looks like on a finished website in our theme demo.
If you have a new Contao installation and have already imported the current theme demo, you can activate the mega menu simply by changing the page layout in the page settings.
If you can’t select it in your Contao installation yet, edit the navigation module and switch the module template and the navigation template to the templates with the suffix megamenu.
You can also add an image for each menu item, which is shown in the mega menu.
Follow these steps to place a news list:
news_latest_zeroone (news list with images)news_short_zeroone (news list without images)news_simple (simple news list with date/author and title only)mod_newslist_zeroone (template settings)Follow these steps to place the news reader (detail view):
news_full_zeroone (template settings)Follow these steps to place a newsletter:
nl_default_zeroone (template settings)Follow these steps to place a search engine:
mod_search_zeroone (template settings)