Search the Community
Showing results for tags 'joss sanglier tuts'.
-
Hi Everyone, As much I am trying to understand the core of PW, I've been following few other tuts including Joss Sanglier's basic webpage tutorial. It was easy to follow except the part where I could not solve problems with image size. Here's link https://processwire.com/docs/tutorials/simple-website-tutorials/the-basic-website/page5 see the "Writing the Panel Code" part. Here's my code... using KubeCSS foundation. <?php include("./includes/head.inc"); ?> <div class="row centered"> <div class="col col-6"> <div class="content"> <h1><?php $page->title; ?></h1> <?php echo $page->ckeditor_1; ?> </div> </div> </div> <?php $panels = $pages->find("template=basic-page"); foreach($panels as $panel);{ ?> <div class="panels" style="background-color:<?php echo $panel->color_picker; ?>"> <div class="row centered"> <div class="col col-8"> <div class="content"> <h2><?php echo $panel->title; ?></h2> <?php echo $panel->ckeditor_2; ?> <p class="readmore"><a href="<?php echo $panel->url; ?>">Read More</a></p> </div> </div> <div class="col col-8"> <div class="content"> <?php if($panel->image_single){ echo "<img src='{$panel->image_single->size(400,200)->url}' alt='{$panel->image_single->description}'>"; } ?> </div> </div> </div> </div> <?php } ?> <?php include("./includes/scripts.inc"); include("./includes/foot.inc"); ?> ... and got error... I've "debugged" part of code and noticed echo "<img src='{$panel->image_single->size(400,200)->url}' alt='{$panel->image_single->description}'>"; The size(400,200) is the problem! Can anyone help me resolve this issues. Thanks in advance