forked from nephila/djangocms-blog
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add render_object_placeholder template tag
- Loading branch information
Showing
4 changed files
with
74 additions
and
22 deletions.
There are no files selected for viewing
26 changes: 15 additions & 11 deletions
26
djangocms_blog/templates/djangocms_blog/includes/blog_item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
{% load djangocms_blog i18n easy_thumbnails_tags cms_tags %} | ||
|
||
<article id="post-{{ postcontent.slug }}" class="post-item"> | ||
<article id="post-{{ post_content.slug }}" class="post-item"> | ||
<header> | ||
<h3><a href="{% absolute_url postcontent %}">{{ postcontent.title }}</a></h3> | ||
{% if postcontent.subtitle %} | ||
<h4>{{ postcontent.subtitle }}</h4> | ||
<h3><a href="{% absolute_url post_content %}">{{ post_content.title }}</a></h3> | ||
{% if post_content.subtitle %} | ||
<h4>{{ post_content.subtitle }}</h4> | ||
{% endif %} | ||
{% block blog_meta %} | ||
{% include "djangocms_blog/includes/blog_meta.html" %} | ||
{% endblock %} | ||
</header> | ||
{% if image and postcontent.post.main_image %} | ||
{% if image and post_content.post.main_image %} | ||
<div class="blog-visual"> | ||
{% thumbnail postcontent.post.main_image postcontent.post.thumbnail_options.size crop=postcontent.post.thumbnail_options.crop upscale=postcontent.post.thumbnail_options.upscale subject_location=postcontent.post.main_image.subject_location as thumb %} | ||
<img src="{{ thumb.url }}" alt="{{ postcontent.main_image.default_alt_text }}" width="{{ thumb.width }}" height="{{ thumb.height }}" /> | ||
{% thumbnail post_content.post.main_image post_content.post.thumbnail_options.size crop=post_content.post.thumbnail_options.crop upscale=post_content.post.thumbnail_options.upscale subject_location=post_content.post.main_image.subject_location as main_image %} | ||
{% if main_image %} | ||
<img src="{{ main_image.url }}" alt="{{ post_content.main_image.default_alt_text|default:'' }}" width="{{ main_image.width }}" height="{{ main_image.height }}" /> | ||
{% else %} | ||
<img src="{{ post_content.post.main_image.url }}" alt="{{ post_content.main_image.default_alt_text|default:'' }}" /> | ||
{% endif %} | ||
</div> | ||
{% else %} | ||
{% media_images postcontent as previews %} | ||
{% media_images post_content as previews %} | ||
<div class="blog-visual"> | ||
{% for preview in previews %}<img src="{{ preview }}" />{% endfor %} | ||
</div> | ||
{% endif %} | ||
<div class="blog-lead"> | ||
{% if not TRUNCWORDS_COUNT %} | ||
{% render_model postcontent "abstract" "" "" "safe" %} | ||
{% render_model post_content "abstract" "" "" "safe" %} | ||
{% else %} | ||
{% render_model postcontent "abstract" "" "" "truncatewords_html:TRUNCWORDS_COUNT|safe" %} | ||
{% render_model post_content "abstract" "" "" "truncatewords_html:TRUNCWORDS_COUNT|safe" %} | ||
{% endif %} | ||
</div> | ||
<footer class="read-more"> | ||
<a href="{% absolute_url postcontent %}">{% trans "read more" %} »</a> | ||
<a href="{% absolute_url post_content %}">{% trans "read more" %} »</a> | ||
</footer> | ||
</article> |
4 changes: 2 additions & 2 deletions
4
djangocms_blog/templates/djangocms_blog/plugins/latest_entries.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters