Permalink
Browse files

Merge branch 'develop' of github.com:divio/django-cms into failfast-o…

…n-invalid-menu-usage
  • Loading branch information...
2 parents 33a759d + 36f9be0 commit 246e6dc2234323bcbab2068215c7ab4af45577a4 Jonas Obrist committed Aug 10, 2011
@@ -12,10 +12,6 @@
//<![CDATA[
jQuery(document).ready(function ($) {
- // change template needs to be defined in toolbar
- // 'change_template': '{% if page %}{% url admin:cms_page_change_template page.pk %}{% else %}null{% endif %}'
-
-
// initialize toolbar, pass options, items and allow public access
CMS.API.Toolbar = new CMS.Toolbar('#cms_toolbar', {{ CMS_TOOLBAR_CONFIG|safe }});
View
@@ -19,6 +19,21 @@ To install it, include
``'cms.middleware.multilingual.MultilingualURLMiddleware'`` in your project's
:setting:`django:MIDDLEWARE_CLASSES` setting.
+.. note::
+
+ This middleware must be put before ``cms.middleware.page.CurrentPageMiddleware``
+
+ Example::
+
+ MIDDLEWARE_CLASSES = (
+ ...
+ 'cms.middleware.multilingual.MultilingualURLMiddleware',
+ 'cms.middleware.user.CurrentUserMiddleware',
+ 'cms.middleware.page.CurrentPageMiddleware',
+ 'cms.middleware.toolbar.ToolbarMiddleware'
+ ...
+ )
+
****************
Language Chooser
****************
@@ -411,4 +411,20 @@ If the current url has no cms-page and is handled by a navigation extender and
the url changes based on the language: You will need to set a language_changer
function with the set_language_changer function in cms.utils.
-For more information, see :doc:`i18n`.
+For more information, see :doc:`i18n`.
+
+.. templatetag:: cms_toolbar
+
+***********
+cms_toolbar
+***********
+
+The ``cms_toolbar`` templatetag will add the needed css and javascript to the
+sekizai blocks in the base template. The templatetag should be placed somewhere
+within the body of the HTML (within ``<body>...</body>``).
+
+Example::
+
+ <body>
+ {% cms_toolbar %}
+ ...
@@ -131,6 +131,7 @@ default Django settings file will not have any)::
'django.core.context_processors.i18n',
'django.core.context_processors.request',
'django.core.context_processors.media',
+ 'django.core.context_processors.static',
'cms.context_processors.media',
'sekizai.context_processors.sekizai',
)

0 comments on commit 246e6dc

Please sign in to comment.