Jump to content

elabx

Members
  • Posts

    1,513
  • Joined

  • Last visited

  • Days Won

    21

elabx last won the day on November 20 2025

elabx had the most liked content!

1 Follower

About elabx

  • Birthday 04/12/1988

Profile Information

  • Gender
    Male
  • Location
    Mexico City

Recent Profile Visitors

30,874 profile views

elabx's Achievements

Hero Member

Hero Member (6/6)

1.6k

Reputation

1

Community Answers

  1. Google maps is really expensive nowadays.
  2. elabx

    I'm back

    Awesome to see you back around 🙂 Game changer, so glad to hear about this!
  3. Always insterested in this sort of projects, thanks for sharing!
  4. This looks amazin @Peter Knight, are you releasing this to the public or as a paid module?
  5. Glad to hear that! In the age of AI I think it's hard to get your mind to have patience and stop to learn the fundamentals, so kudos to you!
  6. Just seems more appropiate! Since WireArray is the base iterable array type in ProcessWire, it's a really handy way to work with lists of things imho. PageArray is meant to work for situations that need pagination from my understanding. Here the intention is to import Pagefile objects returned within a collection (Pagefiles, heads up on plural!), from the findTag method. So you end up with a WireArray containing Pagefile objects. I haven't tested any of this so please bear with me if there are any errors! You're absolutely right! (Claude pun intended) it should be $item as the anonymous function parameter. The syntax for use (&$images) is to pass the WireArray as reference into the context of the anonymous function, the anon function wouldn't know about the $images variable if not passed like this. If we didn't use the "&" we would be passing the value not the reference to the variable and we wouldn't be able to use $images as a "bucket of Pagefile objects". Example.
  7. I can guarantee from experience all these work together fine. This could be another logic for your what you are trying to achieve, although I don't see anything wrong in your snippet! Just figuring out that if you are getting started you might find these examples useful: // assuming section is the name of the repeater $projects = $pages->find("template=project, section.images.tags=gallery"); foreach ($projects as $project) { $title = $project->project_header->first()->project_title; // Maybe something like this to get images from any of the repeaters? $images = new WireArray(); $project->section->each(function($images) use(&$images){ $images->import($item->images->findTag("gallery")); }; foreach ($images as $img) { echo "<a href='{$project->url}' title='{$title}'>"; echo $img->render(); echo "</a>"; } }
  8. My personal solution for this issue, without using third party modules, has been: Setup a page reference field on the home template, that lets me pick the projects I want to showcase, and I make the assumption that l'll pick the first image of the gallery of each project. So i the home template you'll end up with something like: <div id="masonry-gallery"> <?php foreach($page->portfolio_pick as $project):?> <img src="<?=$project->gallery->first->url?>"> <?php endforeach ?> </div> - gallery being the field within the project template. - portfolio_pick being the page reference field on the home template. Another thing I've done, but that I'm not a huge fan of for certain uses, is adding a extra fields to the image field, in this example, the field "gallery" in the project template. So you can then code something like this on the home template: <div id="masonry-gallery"> <?php foreach($page->portfolio_pick as $project):?> <img src="<?=$project->gallery->findOne('is_main_image=1')->url?>"> <?php endforeach ?> </div>
  9. That's a bit of the AI bragging, still missing field/template creation to put an example. I focused first on page CRUD. This looks amazing 😮
  10. Worked on this the last couple days: https://github.com/elabx/processwire-mcp just tested it yesterday, so not a lot of usage.
  11. You mean something like this?? https://cursor.com/docs/agent/browser I started doing this with Claude and it does catch the error screens and fixes the bug.
  12. I though you were talking about THIS, now I just furiously started prompting all the bugs meanwhile I go reviewing and doing stuff on my own. Now just boostrapping ddev somwhere (gihub codespaces?) , some E2E testing, feedback loop till acceptance and out of work lol
  13. No! they would hold the placeholder reference! Something like <script src="{APACHE_SCP_NONCE}"> Then swapped by apache right before delivery.
  14. Apache just does it faster from what I remember.
×
×
  • Create New...