Skip to content

Commit

Permalink
[#847] Add a note to the theming docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Hammond committed Sep 11, 2013
1 parent 3065319 commit 40ef2f9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/theming.rst
Expand Up @@ -107,6 +107,8 @@ datasets page at ``/dataset`` is generated from
``ckan/templates/package/search.html``, etc.


.. _template overriding:

Replacing a default template file
---------------------------------

Expand Down Expand Up @@ -428,6 +430,12 @@ their own snippets. To add template snippets, all a plugin needs to do is add a
``snippets`` directory in its ``templates`` directory, and start adding files.
The snippets will be callable from other templates immediately.

.. note::

For CKAN to find your plugins' snippets directories, you should already have
added your plugin's custom template directory to CKAN, see :ref:`template
overriding`.

Let's create a custom snippet to display our dataset of the day, and put the
``<h3>Dataset of the day</h3>`` heading and the code to call the helper
function to retrieve the dataset into the snippet, so that we can reuse the
Expand Down

0 comments on commit 40ef2f9

Please sign in to comment.