Fix image field access
This commit is contained in:
parent
2ff0db4906
commit
0cdefb0fe1
3 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ snippet('base/cont-header');
|
|||
<?php $i=0; foreach($children as $c) : $i++; ?>
|
||||
<div class="col-sm-6 col-lg-3"><div class="card">
|
||||
<a href="<?php echo $c->url(); ?>">
|
||||
<?php if ($img = $c->images()->find($c->exrpt_img())) {
|
||||
<?php if ($img = $c->exrpt_img()->toFile()) {
|
||||
$imgurl = $img->url();
|
||||
$srcset = $img->srcset([
|
||||
'1x' => ['width'=>400, 'quality'=>70],
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
||||
// -------------------------------------------
|
||||
|
||||
$img = $page->images()->find($page->featurette_img());
|
||||
$img = $page->featurette_img()->toFile();
|
||||
|
||||
snippet('base/html-head');
|
||||
snippet('base/cont-header');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue