Jump to content

mcgarriers

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by mcgarriers

  1. My bad. All fixed now. My issue was I had set the limit = 1 for testing purposes. I increased it to 2 and it started working
  2. Many thanks for the replies guys. @Soma Thankyou for this. I have tried this code and although the limit works, there's no sign of any pagination being rendered I have 'Allowed Page Numbers' for this template in the Admin area & I also have the 'Pager' Module installed.
  3. Thanks for the reply. I'll try this first thing tomorrow and report back. Do I need any additional code or is it purely adding the limit? Thank you for your assistance.
  4. Hi, I have the following code in a template that lists all the child pages of that parent. I'd like to include Pagination so it would only show the title of 2 child pages per 'page'. I have completed the process here http://processwire.com/api/modules/markup-pager-nav/ however, I'm now a little unsure how to integrate this into my code below. I tried the example code in that page but to no avail. Can someone explain or point me in the right direction? Here is my current code: <?php if($page->numChildren) { echo "<ul class='nav'>"; foreach($page->children as $child) { ?> <?php echo $child->title; ?> <?php } echo "</ul>"; } ?> Many thanks for any pointers
  5. Yay - $randomImage->page worked beautifully!! Thank you, Diogo
  6. Fantastic! Out grabbing lunch right now but will try as soon as I'm back home. Thanks again sir
  7. Hi @diogo, Do you know if it's possible I can retrieve the Page ID associated with the Random Image that is selected?
  8. Me again Out of interest, how do I retrieve the Page ID associated with the Image?
  9. Perfect!!! Thank you very much for your help & patience throughout. I'm off to develop some more now Thanks, Wanze - I was a being a bit daft. The field name was 'image1' - all sorted now - thank you!!!!
  10. Many thanks for your replies, peeps Wanze, I get this error message: Error: Call to a member function getRandom() on a non-object (line 43 of *************\home.php) @diogo - many thanks for the reply. Using your code, I get the following error: Error: Call to a member function makeNew() on a non-object
  11. Hi, New to ProcessWire but already thoroughly enjoying developing with it. I have a Home Page and I'd like to show a random image from ANY of my web pages on it. The only thing is it needs to find the image from a child page of the parent with ID '1010'. Can someone explain how I achieve this? Thank you, Michael
×
×
  • Create New...