Skip to content

Commit

Permalink
[#520] Added more context to how to add templates within an extension
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Apr 30, 2013
1 parent 66f4ada commit 3ee60a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions doc/templating.rst
Expand Up @@ -162,6 +162,14 @@ for creating common form fields.
They should generally be avoided as they are hard to extend and
customise.

Templating within extensions
----------------------------

When you need to add or customize a template from within an extension you need
to tell CKAN that there is a template directory that it can call from. Within
your ``update_config`` method for the extension you'll need to add a
``extra_template_paths`` to the ``config``.

Custom Control Structures
-------------------------

Expand Down
4 changes: 2 additions & 2 deletions doc/theming.rst
Expand Up @@ -77,7 +77,7 @@ has template inheritance which means that you don't have to re-write a whole
template in order to change small elements within templates.

For more information on how to exactly change the HTML of your CKAN instance:
please read the `Templating`_ documentation.
please read the `Templating > Templating within extensions`_ documentation.


Including custom Stylesheets, JavaScript and images
Expand Down Expand Up @@ -131,7 +131,7 @@ For more information on how CSS works in CKAN core: please read the
.. _Jinja2: http://Jinja2.pocoo.org/
.. _markdown: http://daringfireball.net/projects/markdown/
.. _LESS: http://lesscss.org/
.. _Templating: ./templating.html
.. _Templating > Templating within extensions: ./templating.html#templating-within-extensions
.. _Resources > Resources within extensions: ./resources.html#resources-within-extensions
.. _Building a JavaScript Module: ./javascript-module-tutorial.html
.. _Front End Documentation > Stylesheets: ./frontend-development.html#stylesheets
Expand Down

0 comments on commit 3ee60a5

Please sign in to comment.