Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,8 @@ def gettext(s): return s
PORTAL_BLOG_SHOW_CATEGORIES = True
PORTAL_BLOG_SHOW_TAGS = True
# To flag posts of certain category or tag, so template can take special action
PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'sample_value_e_g__mutlimedia__'
PORTAL_BLOG_SHOW_ABSTRACT_TAG = 'sample_value_e_g__redirect__'
PORTAL_BLOG_CUSTOM_MEDIA_POST_CATEGORY = 'mutlimedia'
PORTAL_BLOG_SHOW_ABSTRACT_TAG = 'external'
Comment thread
wesleyboar marked this conversation as resolved.

PORTAL_BLOG_CATEGORY_ORDER = []
# PORTAL_BLOG_CATEGORY_ORDER = ['press-release', 'feature-story', 'multimedia', 'podcast']
Expand Down
17 changes: 16 additions & 1 deletion taccsite_cms/templates/djangocms_blog/post_detail.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{# https://github.com/nephila/djangocms-blog/blob/1.2.3/djangocms_blog/templates/djangocms_blog/post_detail.html #}
{% extends "djangocms_blog/post_detail.html" %}
{% load i18n easy_thumbnails_tags cms_tags blog_post_use_custom_media blog_post_is_show_abstract %}
{# TACC (define whether this is a special post): #}
{# TACC (redirect external articles): #}
{% load i18n easy_thumbnails_tags cms_tags static sekizai_tags blog_post_use_custom_media blog_post_is_show_abstract %}
{# /TACC #}
{# /TACC #}

{% block content_blog %}{% spaceless %}

Expand Down Expand Up @@ -82,6 +86,17 @@ <h3>{% render_model post "subtitle" %}</h3>
</section>
{% endif %}
</article>

{# TACC (redirect external articles): #}
{% addtoblock "js" %}
<script id="redirect-external-article" type="module">
import { redirectExternalArticle } from '{% static "site_cms/js/modules/manageExternalArticles.js" %}';

redirectExternalArticle('{{ settings.PORTAL_BLOG_SHOW_ABSTRACT_TAG }}');
</script>
{% endaddtoblock %}
Comment thread
wesleyboar marked this conversation as resolved.
{# /TACC #}

{# TACC (end wrap and end spaceless-ness later than source): #}
{% endspaceless %}
{# /TACC #}
Expand Down
14 changes: 13 additions & 1 deletion taccsite_cms/templates/djangocms_blog/post_list.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{# https://github.com/nephila/djangocms-blog/blob/1.2.3/djangocms_blog/templates/djangocms_blog/post_list.html #}
{% extends "djangocms_blog/base.html" %}
{% load i18n easy_thumbnails_tags cms_tags %}{% spaceless %}
{# TACC (change how to open external articles): #}
{% load i18n easy_thumbnails_tags cms_tags static sekizai_tags %}{% spaceless %}
{# /TACC #}

{% block canonical_url %}<link rel="canonical" href="{{ view.get_view_url }}"/>{% endblock canonical_url %}

Expand Down Expand Up @@ -78,5 +80,15 @@ <h2>
{% endif %}
</section>

{# TACC (change how to open external articles): #}
{% addtoblock "js" %}
<script type="module" id="change-how-to-open-external-articles">
import { changeHowExternalArticleOpens } from '{% static "site_cms/js/modules/manageExternalArticles.js" %}';

changeHowExternalArticleOpens('{{ settings.PORTAL_BLOG_SHOW_ABSTRACT_TAG }}');
</script>
{% endaddtoblock %}
Comment thread
wesleyboar marked this conversation as resolved.
{# /TACC #}

{% endblock %}
{% endspaceless %}