feat: widgets interface
Widgets are reusable jinja templates which can be used in other
themplates. Widgets are written in widgets/ directory in every frappe
module and can be accessed as `{{ widgets.WidgetName(...) }}` from any
template.
This commit is contained in:
14
community/lms/widgets/HelloWorld.html
Normal file
14
community/lms/widgets/HelloWorld.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{#
|
||||
Widget to demonostrate how to write a widget.
|
||||
|
||||
A wiget is a reusable template, that can be used in
|
||||
other templates.
|
||||
|
||||
To this widget can be called as:
|
||||
|
||||
{{ widgets.HelloWorld(name="World") }}
|
||||
#}
|
||||
|
||||
<div class="hello">
|
||||
Hello, <em>{{ name }}</em>!
|
||||
</div>
|
||||
Reference in New Issue
Block a user