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.
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.
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
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!!!!
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
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