SamC

Members
  • Content count

    388
  • Joined

  • Last visited

Community Reputation

252 Excellent

1 Follower

About SamC

  • Rank
    Sr. Member

Profile Information

  • Location
    Surrey, UK

Recent Profile Visitors

820 profile views
  1. Ah. I saw that one and didn't install because of 'under development'. Teach me for being a coward. Thanks. Good video btw 😁
  2. Not tried this one, added to the huge todo list 😆
  3. No probs, glad to help. Also see this one: ...which might be useful in addition to the other one.
  4. Hi @ryanC Not sure whether you've seen this: Also, not sure how to exactly help with your approach but the above worked very well for me so far. Includes recaptcha and validation.
  5. I saw a video on youtube: https://www.youtube.com/watch?v=T93nn96UL8o I'm getting a large list right now because I'm using a repeater matrix with 20+ fields on each page (image > body > image > body > code > body > image etc...) so when I save after editing a bunch of fields (without saving in-between) it literally takes up my whole screen. Using AOS I can press the delete key but any way to make these a little more subtle? I think there may have been a thread on here a while back but I can't find it where someone mentioned something similar and how they handle these notices. I can't find anything googling for stuff like 'processwire hiding session messages' or 'processwire alternate session messages'. Like the notices in this: https://processwire.com/talk/topic/15047-show-notices-in-processwire-modal/?do=findComment&comment=135009 Any ideas would be appreciated, thanks.
  6. Once you add your the tag, it can take 24-48hrs for any results to be seen in the analytics account so you wont know if this is working or not for at least a day. This is a good suggestion, especially if you're going to change it out for a wordpress site anyway.
  7. Thanks, sure something like this will be useful.
  8. This is an awesome thread! Thanks all. @flydev can I ask how you created the animation in your first post? Something like this might be useful in my tutorials rather than tonnes of images.
  9. ==UPDATE== I did this in the end using a single 'blog-entry' template. I have the structure: post 1 post 2 post 3 - post 3.1 - post 3.2 post 4 post 5 My menu is now in an include file: <?php namespace ProcessWire; ?> <?php // check if menu needs to be rendered before getting PageArrays if ($page->template == "blog-entry" && $page->parent->template == "blog-entry" || $page->template == "blog-entry" && $page->hasChildren()): // children of complete-guice parent if ($page->template == "blog-entry" && $page->hasChildren()) { $entries = $page->and($page->children); } // children of complete-guide parent elseif ($page->parent->template == "blog-entry") { $entries = $page->parent->and($page->parent->children); } ?> <ul class="list-group"> <?php foreach($entries as $index => $entry): // apply 'active' for current page $currentClass = ($page->id == $entry->id) ? "active" : ""; // change the parent blog post page title to 'Summary' $title = ($index == 0) ? "Summary" : $entry->title; ?> <li class="list-group-item <?= $currentClass; ?>">Page <?= $index + 1; ?>:&nbsp;<a href="<?= $entry->url; ?>"><?= $title; ?></a></li> <?php endforeach; ?> </ul> <?php endif; ?> ...and to output it at the top of a blog post. Only shows if the page has children: // blog-entry.php <?php namespace ProcessWire; ?> <?php include("./includes/multi-page-menu" . ".php"); ?> <div class="container py-5"> <div class="row justify-content-center"> <div class="col-lg-9"> <?php if($page->bodyRepeater): ?> <?= $page->render("bodyRepeater"); ?> <?php endif; ?> </div> </div> </div> <?php include("./includes/multi-page-menu" . ".php"); ?> ...with structure: ...renders: Only need one template now for anything that is a blog post whether it's a single page or has children. Now I can use the family settings properly without having to choose a template when Adding New > Blog Post. I'm quite a big fan of these settings.
  10. Module works amazing. In my case, I needed to show the fields only if the page does not have a parent of a certain template (as the child pages simply display the parents fields on the webpage), selector: parent.template!=complete-guide ...and the out the box options only allows for fields on the same page. Thanks @Robin S
  11. @adrian I think it might take awhile to get used to but I'll give it a shot.
  12. One of those times that even though I'm pretty pleased with my progress, a quick scroll in there tells me I've only just got over a few small rocks at the bottom of the massive PHP mountain. Do you leave this on when a site goes live or uninstall it?
  13. Been meaning to do it for awhile, this reminded me. Gonna go and install her now.
  14. Nice! Will bookmark this one for a later date
  15. @houseofdeadleg weird! I'm pretty intrigued with this. Gonna go try pagination right now on my test site. =EDIT= Ok, just did it and works ok. <?php namespace ProcessWire; ?> <?php // template file blog-index.php // make sure to set pagination on the template that lists the pages, // not on the template of the individual items that are being listed // i.e. in your case, on template 'news' ?> <?php // get top level posts only under /tutorials/ $entries = $pages->find("template=blog-entry|complete-guide, sort=-postDate, parent=1017, limit=6"); $pagination = $entries->renderPager(); ?> <div class="container py-5"> <?= $pagination; ?> </div> <div class="container py-5"> <div class="row"> <?php foreach ($entries as $entry): ?> <div class="col-md-4 mb-5"> <?php include("./includes/card" . ".php"); ?> </div> <?php endforeach; ?> </div> </div> ...outputs: <ul class='MarkupPagerNav' role='navigation' aria-label='Pagination links'> <li aria-label='Page 1, current page' class='MarkupPagerNavOn MarkupPagerNavFirst MarkupPagerNavFirstNum' aria-current='true'><a href='/processwire-tutorials/'><span>1</span></a></li> <li aria-label='Page 2'><a href='/processwire-tutorials/page2/'><span>2</span></a></li> <li aria-label='Page 3' class='MarkupPagerNavLastNum'><a href='/processwire-tutorials/page3/'><span>3</span></a></li> <li aria-label='Next page' class='MarkupPagerNavNext MarkupPagerNavLast'><a href='/processwire-tutorials/page2/'><span>Next</span></a></li> </ul> And on screen, just a basic list: Pretty confused at why yours don't click.