Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/29/2024 in all areas

  1. Hey! I would like to announce that there is a new ProcessWire powered collaboration between me and Jan Ploch ? @jploch. When I moved to Hamburg, I contacted him through the forum and we ended up working at the same shared office. Meanwhile we collaborated on some projects and then started our own company (a GbR, in Germany). We named it KONKAT Studio. Now we are publishing our brand new website konkat.studio As you may know, Jan developed a page builder for ProcessWire called PAGEGRID. At first, we were going to develop our website the usual way, but then we decided that we should take PAGEGRID for a spin and beat the hell out of it, to see what we could come up with ? We had this idea of three rows scrolling in different directions, and because PAGEGRID has scroll animations built in, we managed to do it all without writing a line of code. We may write a case study soon for those who are interested.
    13 points
  2. Congratulations to both of you! I wish you all the best as well. Small note: it seems the font you’re using has a (rather common) vertical metrics issue on Firefox leading to your text being cut by the overflow: hidden You can learn more / test your font here: https://vertical-metrics.netlify.app/ and then maybe get in touch to see if this can be fixed by the type foundry
    3 points
  3. @diogo @jploch Wow that is awesome! It's completely different than anything I've seen before. It's really fun to scroll through too. I'm curious about the development side, how do you take over the scroll behavior in that way? If I view the source, there are two completely separate <html> documents in the output, how is that possible? ?
    3 points
  4. Thanks Ryan! We just take the vertical scroll position and convert it to translateX values on the rows, using requestAnimationFrame() to make it smooth. Well, PAGEGRID is doing it ?. There was a second <html> added by $config->prependTemplateFile. We forgot to remove it when we moved it from local to a new install in the server ? Thanks for catching this! Thanks Romain! Thanks for catching the problem with the font. For now we added a max-height only for Firefox using @-moz-document url-prefix(). We'll see if there's another version of Neue Haas Grotesk that doesn't have this problem.
    2 points
  5. This is aweseome news. Great new site, great new collab. I wish you all the best. Congrats, guys! ? Honestly can't wait to see your future projects and the case study for your site.
    2 points
  6. I reported this behavior to the dev who created the Twig module for PW and the given solution is to use get(). I hate some of the Twig behaviors and consider switching to another solution in the future. Another thing to know is that, when you call page.noIndex, if not found Twig will also call method page.getNoIndex(), property page.getNoIndex and a bunch of other calls like that...
    1 point
  7. Thank you all, I checked and the value does not exist. Since the code that gives problems is used inside an included file (a header) I should foresee whatever case arises: existence or non-existence, etc. Da2's solution works, but I wonder if Twig crashes so easily on a typical conditional case, and if there isn't a pure Twig approach to use. Thanks
    1 point
  8. Thanks a lot guys for your opinions. It's always good to hear that others are struggling with this kind of weird problems as well ( @millipedia "We lost a client of 20 years to it last year") and that I'm not the only one ? The client is important to me, and I have been doing more research over the last few days. The client even suggested a CMS to me - https://cargo.site. I've been playing with it and it was one of the worst experiences with a page builder (or whatever that thing is called) I've ever had. I think @FireWire summarized the situation very well in his post: "Is this client expecting something that can't be done that may get you stuck in a position where you can't deliver?" I guess if they really want me to work with this Cargo CMS, I'll have to let them go. Fun fact: although the client suggested Cargo, it does not seem to fulfill their own demands... Time will tell how this story ends.
    1 point
  9. That just worked perfectly. Thank you Robin!
    1 point
  10. Thank you for pointing it out. I added these instructions to my original post.
    1 point
  11. I just installed the module on PW 3.0.229 and I chose the alt language as default but there is no redirect. EDIT: I had to do few more things to actually work: Add a page name to the default language on the Home page On Languages Support - Page Names module at "Default language homepage URL is same as root URL?" select "No - Root URL performs a redirect to: /name/"
    1 point
  12. I was going to suggest using inputfield dependencies as this would be the simplest option but it turns out there's a problem when using these with custom image fields: https://github.com/processwire/processwire-issues/issues/1889 So here's a hook instead. In this demo I want to show an error message if text_2 is left empty when text_1 is populated. You can adapt the names/labels/logic to your case. $wire->addHookAfter('InputfieldText::processInput', function(HookEvent $event) { $inputfield = $event->object; $field = $inputfield->hasField; $page = $inputfield->hasPage; // Only for an inputfield associated with field "text_2" // Adjust the field name to suit if($field && $field->name === 'text_2') { // Only for an inputfield that is associated with a page using the custom image fields template // Adjust the template name to suit if($page && $page->template == 'field-images_custom') { /** @var InputfieldWrapper $wrapper */ $wrapper = $inputfield->parent; // Get sibling inputfield by label because the name will include a random string // Adjust inputfield label to suit $text_1 = $wrapper->children->get('label="Text 1"'); // Show an error message if text_2 is left empty when text_1 is populated if($text_1 && $text_1->value && !$inputfield->value) { $inputfield->error('A value for "Text 2" is required when "Text 1" is populated.'); } } } });
    1 point
  13. Try "has_parent!=2, include=hidden". If you only need a selector and not more advanced PHP logic then it's simpler to use the "Selector string" option rather than the "Custom PHP code" option.
    1 point
  14. For those who want to block the vendor folder using ProcessWire's main htaccess file, here's a snippet: https://github.com/processwire/processwire-requests/issues/191#issuecomment-1969214984
    1 point
  15. @Gideon So Sorry I posted the wrong link, meant this one: https://github.com/Toutouwai/CustomInputfieldDependencies @Tyssen You should be able to do something like this:
    1 point
  16. There's also bugs in Twig, sometimes it will say the variable doesn't exist when it exists but has no value. The workaround is to use get(): page.get('noindex');
    1 point
  17. I'll chip in some thoughts here, and this is from a perspective of caring about you @titanium in this situation. Well... they're graphic designers, not web designers. I've lead a web team and trained graphic designers to become web designers because they are not remotely the same. I always take the route of asking questions- a lot of them- because I wouldn't be able to make an accurate recommendation without understanding their needs. So I'd ask about more specifics about their design, view a mockup if they have one, understand what they're asking for because it does sound to me like they're asking for the moon. It's a moment where people reveal their level of expertise, or lack thereof, in the first sentence of their request. Sounds like they want * { position: absolute; } This is why I always operate with this thought in mind: what a client asks for does not have intrinsic correlation with what they need, or even want to begin with. Maybe they actually could achieve what they want using sane tools like @bernhard's builder. I'm sure there are more specifics to your situation and I'm not sure of the relationship you have with this client, but I would be concerned that they're going to end up trying to do something that isn't possible, or is so remotely possible that it's not worth their time, or yours. It might be worthwhile to ask yourself: Is this client expecting something that can't be done that may get you stuck in a position where you can't deliver? You're the expert in this field. Wix, Squarespace, GoDaddy Website Builder (lol), etc. They all fundamentally build in blocks with all of the standard limitations of the web. If they want to be big kid web designers then the onus of finding a tool that lets them do what we do is their job, in my most humblest of opinions.
    1 point
  18. Obviously you should try and educate your client into the advantages of building in PW (and in the difficulties of designing a pixel perfect site that works across all browser and devices) but if they really insist on being able to fiddle then WebFlow is probably the kind of thing they want. Not a PW solution, but it does work well once you get the hang of it. We lost a client of 20 years to it last year ?
    1 point
  19. Thank you @Stefanowitsch for mentioning RockPageBuilder! However, it appears that what they need might differ from what RockPageBuilder offers. @FireWire eloquently highlighted this distinction recently: So, RockPageBuilder is more about helping developers to build content elements quickly and easily. These blocks enable clients to populate their websites with content seamlessly, without the need to think too much about the technical and visual aspects (because this is our job as web professionals). It's less about designing and more about managing content, which is something I love about ProcessWire and where it really shines. In RockPageBuilder the design is done in code - CSS, Less, Tailwind, UIkit, Bootstrap. You can choose whatever you like best. If you want a no-code page designer there are plenty of options out there, but RockPageBuilder is likely not your first choice ?
    1 point
  20. You can also try PAGEGRID, it's a very flexible no-code pagebuilder for processwire. You can try it for free and see if it works for you.
    1 point
  21. @bernhard do you think this is something the RockPageBuilder can handle?
    1 point
  22. On the dev branch this week we have a good collection of issue fixes and feature requests. The dev branch commit log has all the details. One feature added this week which I think could come in very handy is #520 (via @Jonathan Lahijani) which adds the ability to hide individual images in an images field. When an image is hidden, you can see and work with it in the admin, but it gets removed from the field value on the front-end of the site at runtime, effectively hiding it. I know I'll use this a lot, particularly on photo galleries where I may want to remove an image or two from appearing in the grid of photos, but don't necessarily want to delete them. Images can be hidden (or unhidden) from the Actions select of each image, where you'll see a "Hide" option (or an "Unhide" option if the image is already hidden). Hidden images are also dimmed out when viewing the images field in the admin. On the API side, you can hide or unhide images and files using $image->hidden(true) to hide, $image->hidden(false) to unhide, and $image->hidden() to get a true or false as to whether or not the image is hidden. Though this will only be useful on unformatted field values, since hidden images are automatically removed from formatted field values. The same can be used with regular file fields, but we don't currently have a UI/interface for hiding or unhiding items from regular (non-image) file fields. Likely we'll add one soon, but I figured it's likely to get more use with image fields than file fields, so figured we'd start there. More next week. Thanks for reading and have a great weekend!
    1 point
  23. Hello @Flashmaster82 Please copy this code to your template: $form = $modules->get('FrontendContact')->getForm(); // phone field $phone = new \FrontendForms\InputText('phone'); $phone->setLabel('Phone number'); $phone->setRule('numeric'); $phone->setRule('required'); // add this field after the name field $form->addAfter($phone, $form->getFormElementByName('surname')); $service = new \FrontendForms\Select('service'); $service->setLabel('Services'); $service->addOption('Service 1', 'service1'); $service->addOption('Service 2', 'service2'); $service->addOption('Service 3', 'service3'); $service->setRule('required'); $form->addBefore($service, $form->getFormElementByName('message')); echo $form->render();// Render the form I have disabled following forms in the backend configuration of this module, because they were not on your list: gender, subject and privacy. BTW, you have not written if the dropdown should be a single select or a multi-select, so I have chosen a single select. To position the custom form fields inside the form I have used the addBefore() and addAfter() method. You will find an explanation about using custom fields on GitHub. If you want to know, how you create custom fields you will find a lot of examples inside the repository of FrontendForms. Hope this helps!
    1 point
  24. Found this recently. Thought I would share. It provides a GUI in VSCode for DDEV. https://marketplace.visualstudio.com/items?itemName=biati.ddev-manager
    1 point
  25. SOLVED: So I added in the whitelisting just after the $input get. if($input->get->channel){ $channel = $input->get->text('channel'); $input->whitelist('channel', $channel);// This is what I was missing. $chanArray = explode("_", $channel); $chan = $channel = str_replace('_', '|', $channel); $selector = $selector .= ",ab_channels=$chan"; } I had the whitelist but needed to add it after the $input->get. I also added $input->get->text('') to help sanitize according to the docs.
    1 point
  26. I took @bcartier's code from this post and made a configurable module from it. EDIT: to make it work, you need to follow 2 steps (thanks to @PWaddict for pointing it out): Add a page name to the default language on the Home page On Languages Support - Page Names module at "Default language homepage URL is same as root URL?" select "No - Root URL performs a redirect to: /name/" You can find the module attached. I can confirm that the redirection to a non-default language works on PW 3.0.172 DefaultFrontendLanguage.zip
    1 point
  27. Found another one tonight while testing a sandbox install with a lot of Lorem Ipsum.... Wasn't loading a page with the name 'praesent-vel-quam-porttitor-nulla' because of 'null' being in the name. Seems a little extreme, or not very well implemented, but I just removed it from the name as it is unlikely that 'null' would appear in a page name. Worth noting though! Cheers, Chris
    1 point
×
×
  • Create New...