Jump to content

Jon E

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by Jon E

  1. Sorry, would you mind showing me how that code would look? So rather than having that thumbnail 4 times I want to show all of the images uploaded to the image field within the page...... Thanks so much
  2. Hi there, If anyone could give me the code snippet to show all of the images from a child page that would be fantastic. At the moment I can only show the first one? I would love to show them all in list items... Thanks, Jon <div id="portfolio_list"> <?php $features = $pages->find("template=project, sort=-date"); foreach($features as $feature) { $thumb = $feature->thumbnail ? $feature->thumbnail->width(800)->url : "http://i.imgur.com/1zxfxMW.jpg"; // if no thumbnail, replace by placeholder echo "<ul class='bxslider'>" . "<li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> </ul>" . //changed from $thumb->url to only $thumb "</ul>"; } ?> </div>
  3. Hi, I want to display all of the images from a page on the listing page - so for example I want the markup to be similar to: <?php include 'head.inc'; ?> <div id="portfolio_list"> <?php $features = $pages->find("template=project, sort=-date"); foreach($features as $feature) { $thumb = $feature->thumbnail ? $feature->thumbnail->width(800)->url : "http://i.imgur.com/1zxfxMW.jpg"; // if no thumbnail, replace by placeholder echo "<ul class='bxslider'>" . "<li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> <li><img src='{$thumb}' /></li> </ul>" . //changed from $thumb->url to only $thumb "; } ?> </div> <?php include 'foot.inc'; ?> ...roughly. Could anyone help me out? Thanks
  4. Hi, I have looked around a lot but really can't find the answer to this. Basically I have a template called 'creative.php' which is basically a user profile. I then have a template called 'project.php'. I then have a field which is a 'page' as far as I understand. So I have the functionality to select pages (which the person contributed to). I want to output the projects by each person which I have assigned, but I'm not sure how to do this. I want to show an array of the pages (selecting the first image as a thumbnail) and the title of the page. Then in project.php I want to do the opposite and show the creatives which have contributed... does this all make sense? Thanks so much.
  5. Hi, Sorry this is probably very basic logic, but I wondered what you would suggest if my code is: <?php $features = $pages->find("template=portfolio, limit=4, sort=-date"); foreach($features as $feature) { $thumb = $feature->thumbnail->size(244,244); echo "<li>" . "<a href='{$feature->url}'><div id='explore_thumb'><img src='{$thumb->url}'></div>" . "<h3>{$feature->title}</h3>" . "<h4>{$feature->summary}</h4></a>" . "</li>"; } ?> And I want to output a placeholder image in the instance that a thumbnail isn't uploaded... Thanks, Jon
  6. Thanks guys, haha I think I can safely cut down on the amount of times I've included jQuery... especially as there are two references to another site I just did... whoops!
  7. Thanks so much, that's all really useful feedback. The Vimeo player is fine I agree, I just need to get rid of that awful YouTube player - always makes such a big difference to a site visually. I've made the email address clickable - usually I'd put a contact form into the page but we decided it was for the best that there was just an address. I'll look at the other text-based pages and see if I can give them some love. Thanks again!
  8. Hi all, My second site made using Processwire - there are still some bits to do such as using a custom video player and tidying some things up but here's what we have so far: (Sorry forgot to add, the site is mildly NSFW) http://marieschuller.com/ Thoughts / criticisms welcome! Thank-you.
  9. Very nice! Love the idea of keeping it all on one page with that amount of content.
  10. Thanks for taking a look! Yeah I'm not mad on that either but it's how she wanted it. I guess I could at least break up the image and add some alt tags but we'll see.
  11. Hi all, Here's my first site using Processwire, a site for a friend of mine who is an illustrator. There's still a fair bit of tidying up to do but this is what I have so far... Feedback more than welcome. Processwire is an incredible framework, I'd use it again and again for projects now. Thanks for all of the hard work put in to making such a great tool. Anyway, here's the site: http://amberanderson.co.uk/ Thanks!
  12. Thank-you so much! So useful. Very easy solution, too!
  13. Hi, I've put the code: <?php $features = $pages->find("featured=1, limit=6, sort=-date"); foreach($features as $feature) { $thumb = $feature->images->first()->size(100,100); echo "<li>" . "<a href='{$feature->url}'><div id='explore_thumb'><img src='{$feature->images->first()->url }'></div></a>" . "<h3><a href='{$feature->url}'>{$feature->title}</a></h3>" . "<em>{$feature->date}</em>" . "<p>{$feature->intro}</p>" . "</li>"; } ?> Seems not to work though? Thanks I really appreciate this.
  14. Thanks very much, that works a treat. If I wanted to then resize the image to a square how could I include this? So my code is: <?php $features = $pages->find("featured=1, limit=5, sort=-date"); foreach($features as $feature) { echo "<li>" . "<img src='{$feature->images->first()->url }' width='180px'>" . "<h3><a href='{$feature->url}'>{$feature->title}</a></h3>" . "<em>{$feature->date}</em>" . "<p>{$feature->intro}</p>" . "</li>"; } ?> ...and I want to include a function like: $thumb = $image->size(325,325); Again, thank-you so much - answers to questions like these make it so easy to pick things up.
  15. Hi, Sorry for the very basic question, I have looked here and tried to find an answer but I had no luck. Basically I would like to output the first image for each 'item' featured (they all have an image field titled 'images' in the standard way). So, my code so far is: <?php $features = $pages->find("featured=1, limit=5, sort=-date"); foreach($features as $feature) { echo "<li>" . "<h3><a href='{$feature->url}'>{$feature->title}</a></h3>" . "<em>{$feature->date}</em>" . "<p>{$feature->intro}</p>" . "</li>"; } ?> Would anybody be able to help me to ouput the first image from the images field for each of these? Again, sorry for such a basic question. I am so impressed with Processwire, I have used it for 4 sites now and would return again and again. There's nothing that comes close out there. Thanks, Jon
×
×
  • Create New...