====== What are Template Widgets? ====== Template Widgets, called View Functions in earlier versions of The Secretary, are used to display content created with The Secretary on your web page or in templates. A widget is a small piece of code that performs an action or displays text, images and other content. Some widgets can be used only inside a template, while others can be used anywhere on a page with The Secretary included in it. ====== How to use Template Widgets ====== Most Template Widgets are used inside of templates, which you create in The Secretary. Most modules come with a template feature - the Gallery module, for example can manage templates under the menu ''Gallery > Templates > Add'' and ''Gallery > Templates > Edit + Delete''. Often a widget requires one or more parameters (options) and will use that information to carry out its action. For example, the Gallery module has a Template Widget called ''set_author()'' which can display information about the user who created a particular set. This widget accepts one parameter which tells it which piece of information to show, which in this case is the username, display name, email or user level. Just paste the widget code in the large text field in the template editor and The Secretary takes care of everything else. For example: would display something like "mikael", while would display "code@nivr.net". A list of all widgets for each module can be found in this documentation. There is a list [[#widgets-by-module|below]]. ====== Widgets by Module ====== **[[documentation/template-widgets/gallery|Gallery]]**