Blog Entry Image

Post

Posted
Rating:
#3548 (In Topic #670)
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’
In the blog entries, you can set an image that "overrides the news/blog categories standard image," but I can't find what tempcode string I use to call the custom image to display in my template. I see a parameter for defining whether the image resizes, but no reference to the image call itself.
Online now: No Back to the top

Post

Posted
Rating:
#3549
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Hi,

Theoretically it should be automatic.

However, is it that you see the blog poster's avatar rather than the image?

I'd believe that, but I want to confirm the situation first.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3550
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Also please confirm if this is a news box, or viewing the full news entry.


Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3551
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’
I'm modifying the BLOCK_SIDE_NEWS_SUMMARY.tpl to a layout that displays the image in a div located above the blog summary like this 


<div class="col-lg-4 col-md-4 col-sm-12 col-12">
<div class="advisor-img-head justify-content-center">
image goes here
</div>
<div class="advisor-story justify-content-center">
<p class="story-date">{DATE*}</p>
<h4><a title="{$STRIP_TAGS,{NEWS_TITLE}}" href="{FULL_URL*}">{$TRUNCATE_LEFT,{NEWS_TITLE},60,0,1}</a></h4>
<div class="story-intro">
{$TRUNCATE_LEFT,{NEWS},400,0,1,0,0.4}

</div>
<div class="read-more">
<a title="{$STRIP_TAGS,{NEWS_TITLE}}" href="{FULL_URL*}">Read more</a>
</div>
</div>
</div>
Online now: No Back to the top

Post

Posted
Rating:
#3552
Avatar
Site director
Chris Graham is in the usergroup ‘Administrators’
Ok, there's 2 oversights here…

  1. We should not have an image override option on the cms_blogs module because we don't even show news images for blogs, we show avatars. So I'm taking it off. It remains on the cms_news module which can be used for adding blog posts also. cms_blogs is meant to be cut down, so if we have stuff that has no default effect, that's not serving it's original purpose. I realise this may go against what you want, in which case you may wish to copy cms/pages/modules/cms_blogs.php to cms/pages/modules_custom/cms_blogs.php (override it), so the change in the next patch release doesn't apply.
  2. We are not passing in the custom image to the template you mentioned. This is corrected in the fixed file below. It's the IMG_URL Tempcode parameter. Make sure you empty the block cache.

Attachment

sources/blocks/side_news.php



Become a fan of Composr on Facebook or add me as a friend. Add me on on Mastodon. Follow me on Minds (where I am most active). Support me on Patreon

Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about Composr whenever you see the opportunity or support me on Patreon.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying Composr on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Online now: No Back to the top

Post

Posted
Rating:
#3553
Avatar
Standard member
ckgowens is in the usergroup ‘Fan in training’
Many thanks! That worked.
Online now: No Back to the top
1 guest and 0 members have just viewed this.

Statistics

Forum statistics:
  • 2,053 topics, 7,195 posts, 10,839 members
  • Our newest member is PurplewaveIndia
Birthdays:
Back to Top