Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/04/2025 in Posts

  1. I'm currently traveling so don't have anything major to report this week, but wanted to check in. I am posting this from my phone in the car (don't worry, I'm not driving) and I'm not great at typing from my phone so will keep it short. 🙂 Progress continues on the ProcessWire admin design and the website, and I can't wait till we can share it with you. We may soon get another master/main version merged from the dev branch, as there have been a few updates in the last several weeks that I think our stable version would benefit from, and a few more to come as well. More soon! Thanks for reading and have a great weekend!
    6 points
  2. When using vanilla JS you need to make sure that this header is set. This is what tells PW it's an ajax request. jQuery sets it by default, vanilla JS doesn't.
    5 points
  3. 2 points
  4. Hi @bia welcome to the forum, ProcessWire will not output anything automatically. It will only output what you tell it to. Usually that is HTML (websites), but you could also use it to output PDFs or an API or whatever. You tell it what to output in so called template files. So for the template "events" it would call /site/templates/events.php, for example. In that template file, you would then place something like this to show children of your events page: <ul> <?php foreach($page->children as $event) { echo "<li>{$event->title}</li>"; } ?> </ul> This would output an unordered list (<ul>) of events. Then you could add links to directly view those event pages: echo "<li><a href='{$event->url}'>{$event->title}</a></li>";
    2 points
  5. Hello y'll, I so happy introduce technical template for ai generate templates on Tailwind from ProcessWire fields. How to work: Select templates you want to design interfaces for Copy the generated JSON structure Ask AI to "Create a Tailwind CSS design for displaying this ProcessWire data" Specify any preferences like: mobile-first, card layout, table layout, etc. Push button "Copy Prompt" Insert prompt to Claude AI, ChatGPT or another ai services. How to Setup: Use ftp for transfer lego.php to template folder On ProcessWire create template with same name. Create new page with select template. Enjoy. Note: It is not always possible to generate a template from the first time, but by debugging you can make even more or less excellent variants. On example screenshot finish page with adjusting elements, blocks on Tailwind. If you have questions or wishes ask me below. Thank you. UPDs: 04/14 Update prompt lego.php
    1 point
  6. You might need to adjust how the URL segments are parsed.
    1 point
  7. I don’t think it’s good to assume something like no default language = no languages at all. With a button the action is truly delibarate and I think the same as @FireWire that it would be best to keep it as an icon only + tooltip + confirm message to manage space. Which icon though... 😅 Using/tweaking the style of PageListActions: But even with a small string like “Clear all” I’m already picturing it will be too much if you have a bunch of multi-languages fields in the page, so more like: Ideally this should be in consideration / thought through with the new design @ryan is currently implementing. So thanks for bringing this up to him @bernhard!
    1 point
  8. I do this regularly with repeater matrix and even nested repeaters and it just works!
    1 point
  9. @bernhard I really like this direction with adding something next to the languages, it makes a lot of sense and does a good job showing the relationship between the button to what it does. The only concern I have is that on fields with smaller widths a larger tab size will cause some crowding next to the language tabs and cause wrapping. Example would be the description fields for images. Real world example for me: If it could be a little more minimal it would fit in a lot of places, especially if there are many languages. Experimenting with an alternate "X" style icon to differentiate it from the trash icon used to delete blocks, groups, pages, etc. Hover state A popup with a similar message would confirm both the intention and purpose of the button. Perhaps "Delete content in all languages for this field? Cancel/OK". A "delete all" action would prevent having to first manually remove the contents of the default language then click to delete the contents for all other languages. A tooltip would show "Delete content for this field in all languages". With both a tooltip and confirm popup the user would see, understand, and remember its purpose when editing content anywhere in the admin. Thoughts?
    1 point
  10. Ok great we have some positive feedback from ryan as well. He'd be willing to improve that detail in the core as well: Didn't think about the page render option before... What do you guys think? At first I thought it might be exactly one would need, but it might also be exactly the opposite. Maybe someone wants to have the default value blank, but other language values non-blank. Didn't have a good example for that, but I think I have one: What if we are on a website that shows events taking place in Vienna. The default language of the website is german. So for the german version of the website it's just showing the event title and details. But for the non-german website it might show "this event will be in german". Ok thinking about it further I'd probably add a select field then on each event to choose the language and then add that logic to the template code. Anyhow. Wanted to mention that and wanted to provide ryan with some good suggestions that he can easily add to the core. Happy about your input
    1 point
  11. When you encounter a bardump output or errors in TracyDebugger, a link typically appears below the message, allowing you to open the file and line where the output occurred, with VSCode as the default editor. However, in a Windows WSL2 environment, this feature doesn’t work by default. To enable these links, add the `editor` and `localRootPath` variables to the TracyDebugger module's config or in your `site/config-dev.php` (or site/config.php). Here’s an example in my config-dev.php that works for me. Make sure to use `vscode://vscode-remote/wsl+nameOfYourDistro/pathToYourFiles/%file:%line`. This establishes a remote connection to the selected Linux distro. $config->tracy = array( 'frontendPanels' => array('mailInterceptor', 'panelSelector'), 'nonToggleablePanels' => array('mailInterceptor', 'tracyToggler'), 'outputMode' => 'DEVELOPMENT', 'forceIsLocal' => true, 'guestForceDevelopmentLocal' => true, 'editor' => 'vscode://vscode-remote/wsl+Ubuntu22.04/home/jmartsch/htdocs/fugamo/fugamo-shop/%file:%line', 'localRootPath' => 'dist/', 'backendPanels' => array( // 'processwireInfo', // 'requestInfo', // 'processwireLogs', // 'tracyLogs', // 'methodsInfo', // 'debugMode', // 'console', 'mailInterceptor', 'panelSelector', 'tracyToggler' ), ); Now you can click on the filename, and get directly to the corresponding line.
    1 point
  12. Thanks for the tutorial @dotnetic In case someone runs into an issue I had, my Ubuntu 22.04 is the default distro in my WSL2. Hence, I did not need to enter the 22.04 part in my editor path (just '...vscode-remote/wsl+Ubuntu/rest/of/path/'. In fact, doing so leads to an error 'distro not found' (opens in a new VSCode window too).
    1 point
  13. I'm really enjoying DDEV and ProcessWire as I dive back into web development more seriously after many years. However, debugging has always been one of my weak areas, and I'm keen to get that sorted out. So far, I've struggled to find a great tutorial on setting up DDEV with VS Code specifically for ProcessWire. Most of what I've come across are lengthy Drupal tutorials with Drupal-specific settings, which end up overwhelming me. If there isn't a good resource out there, could you please share your setup procedure and the VS Code extensions, settings you've made in "settings.json" that you use with your DDEV ProcessWire environment? For example, I'd like to be able to open a file with a reported error from Tracy Debugger in VS Code, by clicking on it but of course: but my current setup isn't allowing me to do that. I'm also using RockFrontend—thank you @bernhard It's a pleasure to work with, especially when adapting static HTML templates. Thank you so much.
    1 point
  14. I have a new favourite alias ? function rockshell() { ddev exec php rock "$1" } WHY? RockShell needs to be run from within the DDEV web container. So usually you'd either ssh into the container and then run "php rock ..." or you'd have to use the command "ddev exec php rock ..." With this alias all you need to do is type "rockshell ..." ? Or don't add any command and you'll get the list of all RockShell commands: Here are all current aliases that I use: # ddev aliases alias ddc='ddev config --php-version=8.1 --database=mariadb:10.6 --webserver-type=apache-fpm --timezone=Europe/Vienna --omit-containers=dba' alias dds='ddev ssh && alias ll="ls -alh"' #alias dd='ddev start && ddev launch && ddev auth ssh -d ~/.ssh/ddev' alias dd='colima start && ddev start && ddev launch && ddev auth ssh' alias ddm='ddev launch -m' # launch mailhog alias ddr='ddev restart' alias ddp='ddev poweroff' alias ddx='ddev xdebug on' alias ddxo='ddev xdebug off' function rockshell() { ddev exec php rock "$1" }
    1 point
  15. you can also use ?field=yourtab to show only the fields of this tab. I'm using this sometimes combined with the pw side panel edit: this only works with custom fieldsettabs, but maybe you can list the fields one by one, like ?fields=yourfield1,yourfield2
    1 point
  16. When saving the admin remembers which tab was open (only on non-ajax tabs unfortunately). You can link directly to one tab by appending the id like this: .../page/edit/?id=123#ProcessPageEditSettings
    1 point
×
×
  • Create New...