Document `templateDelete` PIP
authorMatthias Schmidt <gravatronics@live.com>
Tue, 8 Jun 2021 16:07:22 +0000 (18:07 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 8 Jun 2021 16:07:22 +0000 (18:07 +0200)
docs/package/pip.md
docs/package/pip/template-delete.md [new file with mode: 0644]
mkdocs.yml
snippets/package/pip/templateDelete.xml [new file with mode: 0644]

index 1c9983531a568f5fea481d540978e8c4149479a5..6a0fa2790ea53f1378e4b318cc402af1c641c530 100644 (file)
@@ -36,6 +36,7 @@ Package Installation Plugins (PIPs) are interfaces to deploy and edit content as
 | [sql](pip/sql.md) | Execute SQL instructions using a MySQL-flavored syntax (also see [database PHP API](database-php-api.md)) |
 | [style](pip/style.md) | Style |
 | [template](pip/template.md) | Frontend templates |
+| [templateDelete](pip/template-delete.md) | Deletes frontend templates installed with [template](pip/template.md) |
 | [templateListener](pip/template-listener.md) | Embed template code into templates without altering the original |
 | [userGroupOption](pip/user-group-option.md) | Permissions for user groups |
 | [userMenu](pip/user-menu.md) | User menu categories and items |
diff --git a/docs/package/pip/template-delete.md b/docs/package/pip/template-delete.md
new file mode 100644 (file)
index 0000000..c72b791
--- /dev/null
@@ -0,0 +1,19 @@
+# Template Delete Package Installation Plugin
+
+Deletes frontend templates installed with the [acpTemplate](pip/acp-template.md) package installation plugin.
+
+!!! warning "You cannot delete templates provided by other packages."
+
+
+## Components
+
+Each item is described as a `<template>` element with an optional `application`, which behaves like it does for [acp templates](acp-template.md#application).
+The templates are identified by their name like when adding [template listeners](template-listener.md), i.e. by the file name without the `.tpl` file extension.
+
+## Example
+
+{jinja{ codebox(
+    title="templateDelete.xml",
+    language="xml",
+    filepath="package/pip/templateDelete.xml"
+) }}
index 0eba921e69679d75f8c973288efdda1fda3035d3..d3dd4492cda14886c257b8577fd6eeeec8515111 100644 (file)
@@ -98,6 +98,7 @@ nav:
       - 'sql': 'package/pip/sql.md'
       - 'style': 'package/pip/style.md'
       - 'template': 'package/pip/template.md'
+      - 'templateDelete': 'package/pip/template-delete.md'
       - 'templateListener': 'package/pip/template-listener.md'
       - 'userGroupOption': 'package/pip/user-group-option.md'
       - 'userMenu': 'package/pip/user-menu.md'
diff --git a/snippets/package/pip/templateDelete.xml b/snippets/package/pip/templateDelete.xml
new file mode 100644 (file)
index 0000000..2cea568
--- /dev/null
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<data xmlns="http://www.woltlab.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.woltlab.com http://www.woltlab.com/XSD/2019/templateDelete.xsd">
+       <delete>
+               <template>fouAdd</template>
+               <template application="app">__appAdd</template>
+       </delete>
+</data>