Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Posts posted by heldercervantes

  1. Hey guys.

    Shouldn't the showcase section have a list by author feature? I just found myself wanting to send someone a link to the showcase of the sites I made in PW and there doesn't seem to be a way to do it.

    And while at it, how about mentioning which projects were featured on PW Weekly?

    We now have a quite large projects list there, and if the point is to show off the best work made with PW to legitimise it, we might as well bring out the best projects and make it cool to be featured.

    What do you think?

    • Like 6
  2. Here's one of my latest projects: https://petibol.pt/

    Petibol develops and produces of all types of EPP (Expanded Polypropylene) and EPS components and packaging for various industries. This website is a collaboration between Supertiny and GOdesign.

    Super simple approach: The frontend is just SCSS and vanilla js "components" (no libraries), and pages are built with a blocks system based on a repeater field.

    Having tried a bunch of stuff between building this site almost a year ago and publishing it (Tailwind, AlpineJS, VUE...) it's pleasing to return to this site's code and compare the approach. Here I've basically set up Laravel Mix to compile SCSS, join and minify a bunch of <1kb js files. A BEM style approach to the styles so that I have a bunch of preset variables for typography, spacing and whatnot, and the JS files follow the same logic of identifying components like the hamburger or the parallax effect by looking for specific data-attributes and going from there. Super clean, performant, and couldn't be easier to pick up and maintain.

    • Like 11
  3. What would really be great is a tutorial on how to set up a project in DDEV, something I'm trying to figure out right now ?

    Edit: Spoke too soon. This is so easy it sounds like a lie.

    1. `ddev config` - Choose PHP project
    2. `git clone https://github.com/processwire/processwire.git web` - Downloads PW into the 'web' directory
    3. `ddev launch` - Go through the config, enter db, db, db, db in the database step


    • Like 2
  4. Here's my most recent project: https://velhinhos.pt/

    Velhinhos (translates to something like "little old people") is a free service that helps people understand their needs and find the best care for their elderly, be it nursing homes, at-home services or daycare.

    The branding – name, logo, tone – is also our work, and we're providing continuity support on ads management and social media.

    This site features some information/advice about the available options, a blog, and a quiz that helps users better understand the level of dependency. It also feeds leads to their Pipedrive CRM.

    The frontend is a mix of Tailwind and StencilJS.

    • Like 10
  5. @bernhard coming back to this as I just stumbled upon a scenario that was discussed here.

    In the Craft project I'm working on someone added changes that I needed to add to my setup. Got the message, tried applying and it stopped saying that these changes require the "Navigation" plugin. I added it (just a 'composer install' command line), came back, ran it again and done. The whole process feels very polished.

    I also had conflicts in the yaml files yesterday, two devs adding new fields. The way to fix it was to include both lines, and right at the beginning there's a timestamp that Craft uses to verify if it's up to date. Used the highest one and added 1 at the end to make sure everyone got an update check.

    It's really interesting to see how these yaml files are set. There's a main one that describes the project, with plugins, system stuff, some names and keys, and then there are individual files for each field, sections (templates), globals and other stuff that doesn't exist on PW.

    • Like 1
  6. On 7/26/2022 at 11:51 AM, bernhard said:

    Thx @heldercervantes that's interesting to see! What does the migrations menu item do or look like?

    Sorry, been away and lost your message.

    On this particular project I don't see anything there, just a message saying "No content migrations". But it doesn't seem to be related to any of this.

    I found some documentation here:

    • Like 1
  7. How Craft warns you of changes to the YAML files that you haven't applied yet (pulled from the repo):


    (I'm so used to the simplification of PW's tree that just seeing a "Routes" button in settings gives me the chills ?)


    And this is the apply changes screen:



    First chance I get I'm going to have a serious look at RockMigrations. Every new project I get is increasingly demanding on maintenance, with multiple devs, and this is a really big deal. This and SPAs, but thats a different discussion.

    • Like 1
  8. 17 minutes ago, bernhard said:

    Let's say a blog post consists of a headline, a body text and a gallery. How would you do that in craft?

    That bit is very similar to PW. They have fields and templates just like us (templates are called sections). It's a bit more friendly and straightforward in PW though. They have "entries" that aren't tied to the page tree and some global stuff, but the basic way of doing things is pretty much the same. And as I create fields and sections I see these YAML files being updated to reflect the definition that's on the database.

    I haven't interacted with applying changes, but I assume in a case like you described the process would somehow detect module requirements and ask you to install or update them first. I guess it could never be a miraculous solution that just does everything and works, but once a project is set up and you get to a point where devs make small increments to the site, this sounds like it will make life a lot easier.

    If you're curious I found some details here. Interesting stuff.

  9. @bernhard That looks super cool.

    I'm now working for a studio that uses Craft CMS and although PW still feels way better in most aspects, in this one Craft has a very good solution. More or less like an automatic RockMigrations.

    As you create fields, sections (templates) and whatnot, Craft generates and updates a bunch of yaml files that contain all configurations. If these files are updated, i.e. you pull someone else's changes from the repo, run a command and it applies all the changes for you. Awesome solution.


    • Like 1
  10. This was probably discussed and maybe I'm just searching wrong, so apologies if I'm spamming.

    In a scenario where we have a production website with a ton of content, and a local dev version with less stuff for tests and sanity. We make structural changes like adding a new page template on the local, adding a couple of fields in an existing one, changing settings on a field and whatnot, and in the end want to publish those changes to production. Any good approaches for doing such a thing without moving  the whole content around or breaking it? I mean, personally I've been doing that with DB backups and I have to lock my client out of the CMS while I'm working on updates. No likey.


    • Like 1
  11. @kongondo thanks, that certainly makes the detection more elegant. Still have to json-parse the "php://input" to get to the object that I'm passing, though. Example:

    $fetchVars = json_decode(file_get_contents('php://input'), true);

    Wouldn't it make sense to have something more processwirey for this as well?

  12. 24 minutes ago, bernhard said:

    Are you talking about a page builder? Then I guess FieldsetPage will not work for you... Or what do you mean exactly with "standardised reusable groups of fields"?


    By "standardised reusable groups of fields" I mean something like what's described in the Combo ProField.

    FieldsetPage works nice, or at least improves my current solution, which goes something like this:


    So basically I'm using a repeater, a block type selector and a bunch of fields (this screenshot is from my last project).

    The block type selector is a custom module I made based on FieldtypeSelectFile. I just added a way of assigning thumbnails to illustrate what php file you're selecting.

    This works pretty well, but something that's a pain in the ass is that I have to dump all fields that every content block may use in the same repeater, and then for each of them, make visibility depend on the block type's value. Also, I have to order the fields and use names that work on any block type that uses them, which becomes a bit of a puzzle sometimes.

    With the FieldsetPage, I at least have things more organised, and I can make adjustments like having fields sorted as it makes more sense for each content block, override titles and descriptions and whatnot. I'm liking this approach. On a first glance only the required fields are still a bit weird to set up, but it's a nice improvement from my previous solution.



    • Like 1
  13. On 3/25/2022 at 8:48 AM, Stefanowitsch said:

    What plugin was used for the image translation effects? Looks super smooth.

    It's all hand coded ?

    The approach is something like this:

    1. Start an IntersectionObserver to determine when the image is in the viewport (or close to it)
    2. When it's in the viewport I start a requestAnimationFrame loop, turn it off when the IntersecionObserver detects the image left the screen
    3. On each tick of the rAF I calculate a new position (get the position relative to the viewport as a %, multiply that by a certain value and assign it to CSS transform: translateY)

    And as I use StencilJS, I create this behaviour as a web-component, in the end I just have to wrap the image in a <c-image-parallax> block and that's it.

    • Like 6
  14. On 2/10/2022 at 3:10 PM, pwired said:

    With all respect to the beautiful website .... but the domain name ?

    I have to agree with you. It feels a bit weird to me, specially the "AR" part, which translates to "air", but I tend to read it as A.R.

    But that's the brand, and it already existed before the website. The domain name too, was already running with a not very good wordpress.

    Good thing is, as she came over to deliver some of her products, she commented that she already had some contacts coming from the site and that wasn't happening before. We haven't even started promoting it other than me sharing it on twitter, so this is great news.

    • Like 4
  15. Natasha Marques is a desserts chef and chocolatier from Brazil with an international carreer. Now established in my hometown Porto, she's about to open a shop and already shipping her premium line of sweets and desserts.

    The website is my usual combo of PW with StencilJS frontend with a content blocks approach. Minimal stack of modules: SeoMaestro, WireMailSmtp, and my own block selector module which is a hacked version of FieldSelectFile.

    The site is only in portuguese, but have a look anyway:

    • Like 18
  • Create New...