From bd73fc6cc17544d14b029c528cd70da73dd0a364 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Sun, 17 Jan 2010 17:55:39 +0000 Subject: Using a single chapter for the API docs and a single chapter for the ZCML directives made it hard to read. --- docs/zcml/resource.rst | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 docs/zcml/resource.rst (limited to 'docs/zcml/resource.rst') diff --git a/docs/zcml/resource.rst b/docs/zcml/resource.rst new file mode 100644 index 000000000..45aa1ce53 --- /dev/null +++ b/docs/zcml/resource.rst @@ -0,0 +1,64 @@ +.. _resource_directive: + +``resource`` +------------ + +The ``resource`` directive adds a resource override for a single +resource. + +Attributes +~~~~~~~~~~ + +``to_override`` + + A :term:`resource specification` specifying the resource to be + overridden. + +``override_with`` + + A :term:`resource specification` specifying the resource which + is used as the override. + +Examples +~~~~~~~~ + +.. topic:: Overriding a Single Resource File + + .. code-block:: xml + :linenos: + + + +.. topic:: Overriding all Resources in a Package + + .. code-block:: xml + :linenos: + + + +.. topic:: Overriding all Resources in a Subdirectory of a Package + + .. code-block:: xml + :linenos: + + + +Alternatives +~~~~~~~~~~~~ + +The :meth:`repoze.bfg.configuration.Configurator.override_resource` +method can be used instead of the ``resource`` ZCML directive. + +See Also +~~~~~~~~ + +See also :ref:`resource_zcml_directive`. -- cgit v1.2.3