CGBlog images not showing in detail template on default page
Posted: Tue Jun 12, 2018 10:48 am
Hi
A conundrum? I have CGBlog installed and have a page that has a main tag in the content block
Which should show the latest post.
I then have a tag in a content block forming the right hand column which gives a list of posts.
Both use the same detail template. However when you navigate to the page the post in the main content shows up with the text, but the images don't show. If I then click on the link in the right hand column the images do show?
I am using the following code to select the appropriate image.
I think it is probably something to do with the way the page is processed. I seem to think that this might be a resent change. Although I can't remember the administrator says the images used to show?
I have tried just calling the image directly without the capture, but the result is the same.
I am running 2.2.7 with all the latest associated modules. PHP version 5.5.38. The only resent changes are upgrade to 2.2.7 and installation of CG content utilities.
Any help would be gratefully received.
A conundrum? I have CGBlog installed and have a page that has a main tag in the content block
Code: Select all
{CGBlog detailtemplate="00_newsdetail" detailpage="latest-news" number="1" category="General" action="detail"}
I then have a tag in a content block forming the right hand column which gives a list of posts.
Code: Select all
{CGBlog summarytemplate="00_newspagesummary" detailpage="latest-news" number="5" category="General" detailtemplate="00_newsdetail"}
I am using the following code to select the appropriate image.
Code: Select all
{if isset($entry->fields)}
{foreach $entry->fields as $field}
{if $field->type == 'image' && $field->name == 'Standard Image' && $field->value != ''}
{capture name=newsdetailimg assign=standardnews}{CGSmartImage src1=$entry->file_location src2=$field->value max_width="1000" max_height="800" class="img-responsive" noembed=1 alt=$entry->title}{/capture}
{/if}
{/foreach}
{/if}
{if isset($entry->fields)}
{foreach $entry->fields as $field}
{if $field->type == 'image' && $field->name == 'Revolving image' && $field->value != ''}
{capture name=newsdetailimg2 assign=revolvingnews}{CGSmartImage src1=$entry->file_location src2=$field->value max_width="1000" max_height="800" class="img-responsive" noembed=1 alt=$entry->title}{/capture}
{/if}
{/foreach}
{/if}
{if $standardnews != ''}
{$standardnews}
{elseif $revolvingnews != ''}
{else}---
{/if}
I have tried just calling the image directly without the capture, but the result is the same.
I am running 2.2.7 with all the latest associated modules. PHP version 5.5.38. The only resent changes are upgrade to 2.2.7 and installation of CG content utilities.
Any help would be gratefully received.