Jump to content

dotnetic

Members
  • Posts

    1,032
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by dotnetic

  1. Another thing is, you can re-use custom page classes in new projects and have their fields/templates created automatically. Develop them only once, copy them over to a fresh PW install, and there you go.
  2. What do you struggle with @Ivan Gretsky? I use RockMigrations for every project right now. You got version control for your fields and templates, and even more. So if you are using git and develop new features, it is of great use because it adds the needed fields/templates when switching branches. Also in conjunction with RockFrontends livereload feature, this is a lot of fun. You add a field in the migrate.php (or somewhere else where you need it, like a custom page class) and the page in the admin autmatically shows the newly added field. This made my workflow so much quicker. I don't use the deploy feature (github actions) because I got my own github actions, so I can not say anything about that.
  3. Very nice addition. Was also hoping for support for adding it via composer.
  4. Thanks @bernhard for adding what we discussed earlier. Works fine 🙂
  5. You can import the attached file into your IDE. See instructions here https://www.jetbrains.com/help/phpstorm/sharing-your-ide-settings.html#import-settings-from-a-zip-archive I don't have much time atm and so I can not provide full instructions and the file not in a repo. Please note, that if you use settings sync, the import will not work and you have to put the "template" folder of the zip file into your PHPStorm settings folder which is depending on your OS somewhat like C:\Users\username\AppData\Roaming\JetBrains\PhpStorm2022.2 (Windows) paste it here! settings.zip
  6. Until we might have a native method for migrations, I encourage you to checkout the great RockMigrations module. With the module you can have one or multiple migration files, that handle all the stuff mentioned above, like adding fields, adding templates, creating pages with content and setting roles. As the migrations are file-based they are also version-controllable. It is also a hassle-free setup and very easy. This makes it easy to work on a feature in a different branch which requires to have other fields/template than in the main branch. Now you can switch between branches and always have the required fields and templates. This is a huge time and workflow improvement. @bernhard steadily improves his module, and me and other contributors try to enhance it, or give feedback.
  7. Did it, because I need the same Please make InputfieldPage::getPageLabel hookable · Issue #460 · processwire/processwire-requests (github.com)
  8. Any javascript errors in the Dev Tools console? Install Tracy Debugger and see if errors occur there
  9. Just the ProcessWire Code, I have to transform everything manually. Sadly IntelliJ has a weird format for the live templates which are stored in an XML file. Sharing and importing isn't also as easy as copying the files to the root directory. Instead you have to import them as settings for the IDE and restart the IDE afterwards. Live templates are a native function of PHPStorm, I think they were a thing before they existed in VSCode. It is somewhat similar to snippets in VSCode. You have your code and then enter $myvariable$ for inserting user text, or things like $boolean$ or $enum$ and can define values for that.
  10. Coming to an IntelliJ IDE (like PHPStorm) near you soon. Live Templates or snippets provide a short way to write repeating code. You enter an abbrevitation and the editor completes the code for you. Here is one example when I want to setup a new module: phpstorm64_aT7Nj2gxSv.mp4 @bernhard Has snippets for VSCode in his great RockMigrations module also, be sure to check them out, if you use VSCode. As I use RockMigrations in every PW installation I also add snippets for migrations: phpstorm64_fAD9MoUJLE.mp4
  11. RockMigrations is the best tool to do migrations with ProcessWire. It saves me so much time when creating new projects or extending older projects. Once you use it and understand it, you don't want to live without it! Thank you very much, @bernhard. Also a good video. I think you explained it very well, hopefully even for beginners. What personally nags me most in every module demonstration video out there (not only from you) is how to install a module. That is annoying to me, but might be useful for others. Gladly I can skip that part and you also added timemarks, sections to the video. Keep up the great work.
  12. That's true. Sadly I am a performance junky and interested in new and shiny things, and so I try out almost everything. Another hint: Use bun instead of npm for installing npm modules. It is sooooo much faster. It can do much more, but I use it just as a npm replacement for now.
  13. Hi @gebeer. Using webpack nowadays feels a little bit outdated for me, because with vite (from the creator of vue.js) setup is so much simpler and faster, and it comes with first-class support for most frameworks like Tailwind or vue out of the box. But it can't do all things webpack does (not yet). Two or three years ago I used a similar approach to what you did now, as you can see in my jmartsch/acegulpandpack: A set of gulp tasks with JS transpilation, webpack, SVG Sprites and minification (github.com) repo. With vite you use native ES modules instead of transpiling and bundling every time something changes. This makes the development process much (MUCH) faster. If you ever seen it in action, you would not like to go back to webpack. If you guys are interested in a modern build environment for your CSS and JS, I could see if I find the time to write a tutorial for it.
  14. Update August 2022: There finally now is a native way of opening the correct file and line, if tracy throws an error. Please see the updated first post.
  15. Yes exactly but with an easier syntax (imho), but dump is just one example. I don't know anything about the caching, and yeah it is bad that not the real file is shown in the dump
  16. I used Smarty and Twig before, and have to say, that Latte feels much better, and the conditional rendering of elements is a great simplification.
  17. This is just syntactic sugar and uses Tracys debug bar, similar to using `{bd ($myvar)}. Using things like tags and filters are also syntactic sugar. {$page->intro|noescape} // or <div n:if="$features"> Tags have some advantages over plain PHP in the template context. For example they are chainable and easy to read/write: {$page->intro|noescape|upper} // outputs unescaped HTML content in uppercase
  18. I did not upgrade yet, I am in the process of integration Latte v3 into the TemplateEngineLatte renderer, but still need time for it. Right now I am using v2
  19. Or just use {dump $page->title} I think you can drop the parentheses after items or content. Also you might want to use a n:if clause on the ul, so the markup is discarded if there are no items. <ul n:if="$block->items"> <li n:foreach="$block->items as $item"> <a href="#">{$item->title}</a> <div>{$item->content|noescape}</div> </li> </ul> I am also using Latte in an actual project and love it so far. For the integration into ProcessWire I am using TemplateEngineFactory. It also has a Latte renderer (but with Latte 2 atm, actual version is 3).
  20. Somewhere in your template where you expect the variables to appear try the following code: print_r($_GET); // or echo $_SERVER["QUERY_STRING"]; What do they output? Also you might want to take a look at this module PaymentPaypal (PaymentPaypal) - ProcessWire Module
  21. Take a look at these alternatives: Laragon (much better and easier setup than Xampp) was my favorite before I stumbled upon ddev (which requires Docker Desktop and WSL2) VSCode (way better for programming than Sublime)
×
×
  • Create New...