Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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: 4 additions & 0 deletions taccsite_cms/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ def gettext(s): return s
PORTAL_BLOG_SHOW_CATEGORIES = True
PORTAL_BLOG_SHOW_TAGS = True
PORTAL_BLOG_SHOW_BYLINE = True
# Whether to automatically show article image on the article page
# FAQ: Designer consistently prefers main image be explicitely added
PORTAL_BLOG_SHOW_MAIN_IMAGE = False
Comment thread
wesleyboar marked this conversation as resolved.
Outdated

PORTAL_BLOG_CATEGORY_ORDER = []
# PORTAL_BLOG_CATEGORY_ORDER = ['press-release', 'feature-story', 'multimedia', 'podcast']
Expand Down Expand Up @@ -736,6 +739,7 @@ def get_subdirs_as_module_names(path):
'PORTAL_BLOG_SHOW_CATEGORIES',
'PORTAL_BLOG_SHOW_TAGS',
'PORTAL_BLOG_SHOW_BYLINE',
'PORTAL_BLOG_SHOW_MAIN_IMAGE',
'PORTAL_BLOG_CATEGORY_ORDER',
'PORTAL_BLOG_TAG_FOR_EXTERNAL_ARTICLES',
'PORTAL_SOCIAL_SHARE_PLATFORMS',
Expand Down
1 change: 1 addition & 0 deletions taccsite_cms/settings/settings_custom.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,4 @@

PORTAL_BLOG_SHOW_CATEGORIES = False
PORTAL_BLOG_SHOW_TAGS = False
PORTAL_BLOG_SHOW_MAIN_IMAGE = False
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ <h4>{{ post.subtitle }}</h4>
</header>
{# TACC (remove whitespace to support css `:empty`): #}
{% spaceless %}
{% if image and post.main_image %}
{# TACC (setting PORTAL_BLOG_SHOW_MAIN_IMAGE): #}
{% if not settings.PORTAL_BLOG_SHOW_MAIN_IMAGE %}
<!-- PORTAL_BLOG_SHOW_MAIN_IMAGE is not True -->
{% elif image and post.main_image %}
{# /TACC #}
<div class="blog-visual">
{% thumbnail post.main_image post.thumbnail_options.size crop=post.thumbnail_options.crop upscale=post.thumbnail_options.upscale subject_location=post.main_image.subject_location as thumb %}
<img src="{{ thumb.url }}" alt="{{ post.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" />
Expand Down
6 changes: 5 additions & 1 deletion taccsite_cms/templates/djangocms_blog/post_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@ <h3>{% render_model post "subtitle" %}</h3>
{% endblock %}
{# /TACC #}
</header>
{% if not post.main_image_id %}
{# TACC (setting PORTAL_BLOG_SHOW_MAIN_IMAGE): #}
{% if not settings.PORTAL_BLOG_SHOW_MAIN_IMAGE %}
<!-- PORTAL_BLOG_SHOW_MAIN_IMAGE is not True -->
{% elif not post.main_image_id %}
{# /TACC #}
<div class="blog-visual">{% render_placeholder post.media %}</div>
Comment thread
wesleyboar marked this conversation as resolved.
Outdated
{% else %}
<div class="blog-visual">
Expand Down