Fix image field access
This commit is contained in:
parent
2ff0db4906
commit
0cdefb0fe1
|
@ -43,9 +43,9 @@ if ($page->depth() == 1) {
|
||||||
<div class="site-wrap">
|
<div class="site-wrap">
|
||||||
<header class="section">
|
<header class="section">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<?php if ($img = $site->images()->find($site->title_image())) : ?>
|
<?php if ($img = $site->title_image()->toFile()) : ?>
|
||||||
<a class="logo" href="<?php echo url() ?>">
|
<a class="logo" href="<?php echo url() ?>">
|
||||||
<img src="<?php echo $site->url().'/content/'.$site->title_image()->html() ?>" alt="Logo">
|
<img src="<?php echo $img->url() ?>" alt="Logo">
|
||||||
</a>
|
</a>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ snippet('base/cont-header');
|
||||||
<?php $i=0; foreach($children as $c) : $i++; ?>
|
<?php $i=0; foreach($children as $c) : $i++; ?>
|
||||||
<div class="col-sm-6 col-lg-3"><div class="card">
|
<div class="col-sm-6 col-lg-3"><div class="card">
|
||||||
<a href="<?php echo $c->url(); ?>">
|
<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();
|
$imgurl = $img->url();
|
||||||
$srcset = $img->srcset([
|
$srcset = $img->srcset([
|
||||||
'1x' => ['width'=>400, 'quality'=>70],
|
'1x' => ['width'=>400, 'quality'=>70],
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// license: http://www.gnu.org/licenses/gpl-3.0.txt GPLv3 License
|
// 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/html-head');
|
||||||
snippet('base/cont-header');
|
snippet('base/cont-header');
|
||||||
|
|
Loading…
Reference in a new issue