PyLucid CMS Logo

How to deactivate Blog comments.

There is no switch to deactivate the comments for blog articles. But you can change the used template and remove the comments stuff.

Use:

and overwrite blog/detail_view.html

↑ blog/detail_view.html - diff:  #

Diff
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
--- a/pylucid_project/pylucid_plugins/blog/templates/blog/detail_view.html
+++ b/pylucid_project/pylucid_plugins/blog/templates/blog/detail_view.html
{% sourcecode ext=".html" %}
{% extends template_name %}
-{% load comments %}
 
 {% block content %}
 <div class="{{ CSS_PLUGIN_CLASS_NAME }} blog">
{% include "blog/includes/tagcloud.html" %}
 
 <fieldset class="entry">
     {% include "blog/includes/blog_entry.html" %}
-    {% include "pylucid_comments/includes/comments_list.html" %}
 </fieldset>
 </div>
 {% endblock content %}

↑ final content:  #

HTML
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
{% extends template_name %}

{% block content %}
<div class="{{ CSS_PLUGIN_CLASS_NAME }} blog">
{% include "blog/includes/tagcloud.html" %}

<fieldset class="entry">
    {% include "blog/includes/blog_entry.html" %}
</fieldset>
</div>
{% endblock content %}

The original template file can be found here: pylucid_project/pylucid_plugins/blog/templates/blog/detail_view.html

↑ reactivate  #

To reactivate the comments, just delete the dbtemplates entry named blog/detail_view.html

To do this, goto:

0 comments for 'disable comments':
    there exist no comment for 'disable comments'
Leave a comment

django-processinfo: 14.7 ms of 450.1 ms (3.3%)