Hi there,
I'm coming from ExpressionEngine and giving PW a try. So far I'm very excited and PW could be my next main cms.
I'm rebuilding my portfolio-site with PW at the moment.
So I have these pages:
Home
--- Portfolio
------Portfolio item #1
------Portfolio item #2
------Portfolio item #3
On Portfolio, I want to list all latest Portfolio items.
I did it with:
<?php
$latest_portfolio = $pages->get("/portfolio")->children();
foreach($latest_portfolio as $item) {
echo "<div class='span3'><article><a href='{$item->url}'>{$item->title}</a></article></div>";}
?>
So it list all my titles. But each item has a "portfolio_image"-field with one big image. So how do I output these image as an thumbnail in my code?
Further I tried to code a detail-view for each item. But my big image is not gonna to display:
<h1><?php echo $page->title; ?></h1>
<?php if ($page->portfolio_image) {
$image = $page->portfolio_image;
echo "<img src='{$image->url}' alt='{$image->description}' />";
}
?>
Title is fine but not the right image-url. It output " site/assets/files/1014/ " and not "site/assets/files/1014/image.jpg"
What did I wrong?