[mezzanine-users] Re: Changing Blog List Images Sizes
This is relatively straightforward. You will just need to modify the blog_post_list.html template (for the list), and/or the blog_post_detail.html template (for an individual post). Here is a bit of code that I use in blog_post_list.html to show thumbnail-type images on my own blog list page, which is here: http://rosslaird.com/blog/ {% editable post.title post.publish_date post.content %} {{ post.title }} By {{ post.user.get_full_name|default:post.user.username }} | {{ post.publish_date }} {{ post.description_from_content|safe|truncatewords_html:"50" }} Read more {% endeditable %} {% if forloop.counter|divisibleby:"3" %} {% endif %} Then, on the page for each individual post, the image is used as the background for the header. That code lives in blog_post_detail.html, and looks like this: {{ blog_post.title }} You can see how the above code renders the page by clicking on any post from the listing page. Hope this helps. Ross On Friday, 16 October 2015 13:59:23 UTC-7, Tommy Long wrote: > > This is probably a simple question so forgive me. I'm trying to find out a > why to change the images that appear on my blog list page to show > thumbnails and not full size images, when a user clicks on them they will > be taken to the blog post page where the full size image will be shown. The > page I'm talking about is here technelogos.com/blog. Thanks for your help. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Re: Changing Blog List Images Sizes
Ross, Thank you so much for helping me and showing me how you implement the code into your blog. I've tried changing my code to mirror yours but I still can't get it to work. I'm still figuring Mezzanine out lol. Here's my code below. {% for blog_post in blog_posts.object_list %} {% block blog_post_main%} {% block blog_post_list_post_title %} {% editable blog_post.title %} {{ blog_post.title }} {% endeditable %} {% endblock %} {% if settings.BLOG_USE_FEATURED_IMAGE and blog_post.featured_image %} {% block blog_post_list_post_featured_image %} {% endblock %} {% endif %} God Bless, Tommy Long Check out my blog at www.technelogos.com/blog On Fri, Oct 16, 2015 at 8:47 PM, Ross Laird wrote: > This is relatively straightforward. You will just need to modify the > blog_post_list.html template (for the list), and/or the > blog_post_detail.html template (for an individual post). > Here is a bit of code that I use in blog_post_list.html to show > thumbnail-type images on my own blog list page, which is here: > http://rosslaird.com/blog/ > > > > {% editable post.title post.publish_date > post.content %} > > > src="{{ MEDIA_URL }}{% thumbnail post.featured_image 360 240 %}" > width="360" height="240" alt=""> > > > > {{ post.title }} > > By {{ > post.user.get_full_name|default:post.user.username }} | {{ > post.publish_date }} > > > > {{ > post.description_from_content|safe|truncatewords_html:"50" }} > > > class="more-link">Read more > > > {% endeditable %} > > {% if forloop.counter|divisibleby:"3" %} > {% endif %} > > > Then, on the page for each individual post, the image is used as the > background for the header. That code lives in blog_post_detail.html, and > looks like this: > > style="background-image: url({{ MEDIA_URL }}{% thumbnail > blog_post.featured_image 1900 700 %});"> > > {{ blog_post.title > }} > > > > You can see how the above code renders the page by clicking on any post > from the listing page. > Hope this helps. > > Ross > > On Friday, 16 October 2015 13:59:23 UTC-7, Tommy Long wrote: >> >> This is probably a simple question so forgive me. I'm trying to find out >> a why to change the images that appear on my blog list page to show >> thumbnails and not full size images, when a user clicks on them they will >> be taken to the blog post page where the full size image will be shown. The >> page I'm talking about is here technelogos.com/blog. Thanks for your >> help. >> > -- > You received this message because you are subscribed to a topic in the > Google Groups "Mezzanine Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/mezzanine-users/hHDFGnbS_Iw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > mezzanine-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Re: Changing Blog List Images Sizes
You're missing a closing curly brace in the tag. -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [mezzanine-users] Re: Changing Blog List Images Sizes
Eduardo, Oops! Thanks for catching that. Been staring at this computer screen for too long apparently. God Bless, Tommy Long Check out my blog at www.technelogos.com/blog On Fri, Oct 16, 2015 at 11:01 PM, Eduardo Rivas wrote: > You're missing a closing curly brace in the tag. > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Mezzanine Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/mezzanine-users/hHDFGnbS_Iw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > mezzanine-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to mezzanine-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.