Leaderboard
Popular Content
Showing content with the highest reputation on 09/14/2023 in all areas
-
That's pretty much the main reason. It would require me to use ProcessWire in a different way and I don't buy into that approach, especially with HTML Over The Wire (for example, htmx) giving me all the benefits of heavy JS-frontends without having to use them. Server-side rendering all the way. I've completely eliminated Node from my workflow and it feels great.4 points
-
@szabesz, I am quite with you as I have been toying with unpoly and htmx a bit, and understand quite well that one should sometimes work hard to achieve with htmx something that comes with unpoly out of the box. I was just saying that AlpineJs has a different purpose (Js sprinkles, jQuery replacement) and is used with either htmx or unpoly.3 points
-
My use of Node was as follows (well it was based on Laravel Mix): downloading packages (package.json / node_modules); for example, getting UIkit, jQuery and whatever else a project required compiling SCSS or Tailwind creating a dist folder with that CSS, other compiled JS and images cache busting As for downloading packages, I have my own ProcessWire module that contains unminified and minified versions of the packages I commonly use or that I deem to be worthy enough to be in the module. I built a very simple way to update those packages and include them in my project as well as well. UIkit is a special case in that it's both SCSS and JS files. If I want to include HTMX for example, I just do this: setting('htmx-enabled', true); and everything gets inserted as it should. The potential drawback of this approach is that because I use this module across many different projects, all projects automatically get upgraded to the latest version of a package which could potentially break things, but that's rare and not a big issue for me. For compiling SCSS, I would have stuck with ProCache (SCSSPHP) but it's completely outdated and that's just not going to change. Therefore I use DartSass. You can download the executables here: https://github.com/sass/dart-sass/releases I've hacked ProCache (because it doesn't have the necessary hooks) so that instead of using SCSSPHP, it uses DartSass. Ryan has expressed the ability for ProCache to be more friendly to using outside compilers so hopefully a future version of ProCache doesn't have to be hacked directly. As for Tailwind, during dev I use Tailwind Play CDN. During production, similar to DartSass, I use TailwindCSS CLI and I hacked ProCache to make it work with it as well: https://tailwindcss.com/blog/standalone-cli https://github.com/tailwindlabs/tailwindcss/releases/tag/v3.3.3 Both DartSass and TailwindCSS CLI have minifiers built-in, so therefore I avoid using ProCache's CSS minifier which has been a a little buggy (although I think it's now fixed?). Technically speaking, TailwindCSS CLI is Node.js under the hood, but it's wrapped up into one executable which feels clean. For what would typically be a "dist" folder, I just avoid that. ProCache Buster handles that in its own way. Yea these is how I think about it as well. HTMX is less opinionated and I like it that way. However HTMX is not the "JS sprinkles" (it's more for HTML over the wire requests) so that's where Alpine.JS comes in.3 points
-
Wow... that's fascinating in some way as I just made my move back to good old ProcessWire with some nice additional extras. Like TailwindCSS and AlpineJS - HTMX is on the list - but that's it. So, yeah... still some Node.js and build scripts involved but that's fine for me. I even moved some small sideprojects from 11ty and Astro back to ProcessWire just because it's way more solid, real, or something like that. Can't describe it. Weird I enjoy ProcessWire right now way more than 12 months ago just by using totally different tools for a few months.3 points
-
Hi, and welcome to the forums! I suggest starting with this thread, which gives various options: Let us know if you need further help!2 points
-
@bernhardis so productive I must have missed the RockPageBuilder thing. Can't find it on github. @Stefanowitsch, where did you get it?)) Ahh. Should've read it from the start) It is explained earlier in this thread.2 points
-
Yea these is how I think about it as well. HTMX is less opinionated and I like it that way. However HTMX is not the "JS sprinkles" (it's more for HTML over the wire requests) so that's where Alpine.JS comes in. While Unploly is definitely more opinionated for sure, that's also its strength and weakness at the same time. If someone starts using AlpineJs along with Unploly, then that person should use HTMX + AlpineJS instead in the first place. While Unploly is definitely more opinionated, it does not mean that based on Unploly is not possible to implement the same features that one would implement using HTMX + AlpineJS. You just need a completely different mindset when using either this or that. By using HTMX + AlpineJS one gets a sort of "lower level" solution while Unploly provides "higher level" tools. Using high level tools has the benefit of also dealing with documented conventions out of the box, while building upon a low level tool requires you to put more work in your documentation. High level tools has the drawback of sometimes having to find workarounds for different use cases, while low level tools introduces less of such issues. I don't want to persuade anyone to use Unpoly, but I want to mention that I use and love it, particularly because upgrading to major versions is always backward compatible. (Backward compatibility support extends to the previous major version.)1 point
-
I'm also very interested in this answer! I feel I'll never leave compiling SCSS/Less in PHP, even it means using an outdated subset of Less, it's just so convenient! I'm very sold on HTMX + AlpineJS, main reason being it saves me from the build step.1 point
-
I see what happened. The client deleted the admin user somehow. I should make users with more restricted access I suppose ? J1 point
-
Yeah I had the pleasure to be one of the earliest customers who uses this module and already made a few websites with it. Once it's released I will give some insight here in the board how I created this and that with it. It's a really powerful tool!1 point
-
Hi, @BrendonKoz thanks a lot for your answer ? you know, using templates as i describe in this thread it works and insert divs or tags of all sorts without wrapping them with empty p's before and after hence my wondering ? actually i can do all i want with this template thing but imagine, you write a long post and suddenly realize somme p's would be nice highlited in a box with a background and some nice styles, hop, with this little plugin you can just select them, click and job done i know, i know, just a lazy option ? as you could insert a template and then cut and paste the content you want into it but i like to make my customers' life as easy and obvious as possible, something the createDiv in CKeditor allowed and i tried to reproduce ? not really important but i'm wondering and won't stop searching (probably studying other plugins code, templates for example...) until i find out the right way to do this ? even if, like i said, with the remove empty p option, not really a problem + it's easy to delete those p's even before saving have a nice day Edited to say: funny enough, if i use insertContent instead of setContent it only adds one empty p after the div, curiouser and curiouser ? Edited again to say: i think i understand why the empty p after the inserted div as in tinymce if it's the last thing you insert and want to add a p after it, hitting enter, it will insert a new div, a bit more confusing for people not used to notice it and convert it into a p, just don't know why it doesn't happen with the template plugin but well, mine is ready, i'll probably post it on github ? Edited once more but for good this time ? it's on github in case anyone may need it https://github.com/virtualgadjo/pw-tinymce-div-plugin1 point
-
@Jonathan Lahijani, would you mind elaborating on this a bit? How do you manage your frontend without node based build chain? I am very interested as I am moving along a similar path, having ditched gulp. Now I do not even concatenate my js leaving it to http2. The only thing i still compile is scss) How do you do it nowadays?1 point
-
That makes total sense, but for some reason it worked fine for me - weird. Unfortunately $_SERVER['HTTP_ORIGIN'] doesn't work when the page 404s. I did some testing with $_SERVER['PHP_SELF'] and that actually seems to work nicely, including when bootstrapping PW in a directly called .php file in the URL. However, reading back through https://github.com/nette/tracy/issues/407 I see that there is a specific reason for loading from the current URL (the linked to XDebug issue: https://github.com/nette/tracy/issues/216), so I am not sure this is actually a good idea. Maybe it does come back to the last point I made in that issue and the loss of the GET params making it through. I am not sure anymore, and am out of steam on this at the moment. Let me know if you have any good ideas :)1 point
-
Hello! I know exactly what you are meaning. Well you have at least three possibilites: 1. Use the Fieldset Page in ProcessWire. With this you can combine fields into one Fieldset. I don't use this Fielset anmyore but if I remember correct you have to install it from the "Core Modules Tab" (under: /processwire/module/). You create a new field (name it for example fieldset_introduction) and then you add fields to it that you want to make use of (cool thing: you can reuse this fields in all other fieldset page fields and don't have to create a "body copy field" for each and everyone of them separetely!) And here is what it looks like on a page template. The fields shown above are aligned in a fieldset named "Introduction". You can add several Fieldsets this way and just put them in any order on your page template. 2. Use the Repeater Matrix Pro Field. This ones commercial but it makes handling and editing Sections on your pages much easier and more flexible! Cool thing is that you can define your content blocks in the field settngs and add the needed fields right there. Then on your page template you can select the type of content block (or name it section): After that it's super easy and comfortable to edit these sections and also change their order! 3. Use a third party page builder module like the RockPageBuilder from @bernhard. This module even beats the popular Repeater Matrix module in my opinion as it accelerates the creation and editing (and managing!) of content massively! Even better, it kind of combines the Repeater Matrix block-buidling functions with frontend editing which is a massive leap forward in terms of workflow optimization and customer happiness (cause it is also very easy to use for non-technically experienced users!).1 point
-
I've heard of Astro and a bunch of other JS heavy frontend frameworks where ProcessWire has to become an API for it to work. Hard pass for me for so many reasons. This article is exactly what I was looking for. Thank you for sharing it! It seems nesting is available on all the latest browsers, but I'd worry about people on old versions of Safari due to being on old versions of macOS (Macs seems to last a while), so yea I agree with using a build process for now if nesting is critical to the way you write CSS, which it is for me as well. Also, doing breakpoints in SCSS in much more intuitive than vanilla CSS.1 point
-
Hi @mel47, are the divs converted to paragraphs? If so you have to disable this in the input tab under "Markup toggles". This works for me. If the divs get stripped out while pasting, I think you have to allow them in the Pastefiler of the module settings: https://processwire.com/blog/posts/using-tinymce-6-in-processwire/#default-pastefilter-whitelist-rules Regards, Andreas1 point
-
We are live and have a very special guest in the video ???1 point
-
So to get it working, nothing fancy, all easy. In this example, only the email user field is used. Thanks @daniels for this module ? Assuming the checkbox field is called "subscribe_newsletter" and added to the "Registration form fields" in LoginRegister settings, in ready.php : wire()->addHookAfter('LoginRegister::processRegisterForm', function($event) { $form = $event->arguments[0]; foreach($form->getAll() as $f) { $name = $f->attr('name'); if(strpos($name, 'register_') !== 0) continue; if($name == 'register_subscribe_newsletter' && wire('input')->post->register_subscribe_newsletter == 1) { $mc = wire('modules')->get("SubscribeToMailchimp"); $email = wire('input')->post->register_email; // Do not forget to saninitize the email field $mc->subscribe($email); } } }); Result:1 point
-
No problem dude, feel free to ask, it will be benefit for other people too. And you was close ? Try this : wire()->addHookBefore('LoginRegister::createdUser', function($event) { $u = $event->arguments[0]; // get user object $mail = WireMail(); // no keyword 'new' $mail->subject('Welcome to our website'); $mail->to($u->email); $body = "<p>" . "Welcome to our website " . $u->name . "</p>"; $mail->body(strip_tags($body)); $mail->bodyHTML($body . "<p><a href='$this->page->url?profile=1'>" . $this->_('Your Account') . "</a></p>"); $mail->send(); });1 point