Recently Updated Topics
Showing topics posted in for the last 7 days.
- Today
-
-
How do you enable updating page name on save like in the module config now that the functionality is in PW core?
- 101 replies
-
- template
- autogenerate
-
(and 2 more)
Tagged with:
- Yesterday
-
Dear Community Members, I am new to ProcessWire and web development. I have just finished basic web development (frontend) and PHP. And now I am exploring ProcessWire. I want to develop a portfolio project for my uncle's business. He wants an e-commerce website with the following features: All the common e-commerce functionalities. B2B and B2C features. CRM. Some custom workflow implementation. Some custom requirements like: An email verification feature for the clients. For registering a b2b client, they need to submit a registration form where they are supposed to upload a business document. The admin (shop owner) looks at the document and categorises the client as a b2b wholesaler or b2b retailer. Wholesalers and retailer sees different prices for products, and similarly do the B2C clients. Appointment scheduling for consultation with payment for booking an appointment. I am doing my best to explore all the resources in the ProcessWire website and documentation. It has been over a week I am looking for a perfect solution and I have come up to the following solutions: The basic e-commerce functionalities can be handled by Modules like ProcessWire Commerce or RockCommerce. Workflow implementation can be done using the hooks. I am not experienced with the above solutions; I just looked at the website, the docs and found them from those resources. If my choices are wrong, please correct me with proper guidance. You may have already crossed the problems and issues that a new developer faces while implementing these modules. For other functionalities, I am still actively looking for some solutions. If you are familiar with such cases, please guide me. I have a dream of starting my own digital agency, and I am selecting ProcessWire as my primary CMF for delivering the websites and web applications to my clients. Thanks in advance!! A big Thanks to the ProcessWire team for such a powerful and valuable open-source CMS framework!!!!
-
Some site-wide JS? // Get the current URL const currentUrl = window.location.href; // Convert to lowercase const lowercaseUrl = currentUrl.toLowerCase(); // Only update if there are uppercase letters if(currentUrl !== lowercaseUrl) { // Use replaceState to update URL without reloading the page window.history.replaceState(null, '', lowercaseUrl); }
- 1 reply
-
- 1
-
-
Good day, PWmates! I just had a super productive and mega fast support session with @FireWire. Great thanks to you, man! I almost forgot how pleasant is it to be here, in the supportive and friendly PW community. I am 12 year around and this great spirit is not going nowhere) Happy New Year to all of us here, where we unite and make at least a little corner of the world a better place! P.S. And if you think this post is late to the party check this out))
- 306 replies
-
- 2
-
-
-
- translation
- language
-
(and 1 more)
Tagged with:
-
Have some swiss customersites by cyon.ch and everything works fine.
- Last week
-
Great, thanks.
-
Hi Ivan, I haven’t had time yet to verify what (if anything) needs to be done on my side, but I’m fairly sure ProcessTranslatePage already uses the DeepL API v2. It relies on the official PHP client library and was updated in mid‑2025, so we should be in good shape. If any updates are required to keep the module working, I’ll take care of them – thanks for the heads up!
-
Hi @markus-th, That’s so smart — exactly what I needed! Thank you very much for your help. Have a wonderful day!
-
Hello everyone, I’m happy to share a new module I’ve been working on: WireMagnet. We often face the requirement to offer "gated content" (like Whitepapers, PDFs, or Zip files) where users need to provide their email address to receive a download link. While there are external services for this, I wanted a native, privacy-friendly, and lightweight ProcessWire solution. What does WireMagnet do? WireMagnet handles the entire flow of capturing leads and delivering files securely. It intercepts form submissions, logs the lead, and sends an email with a unique, temporary download token. It prevents direct access to the files (assets are not just sitting in a public folder). Key Features: Secure Delivery: Generates unique download tokens (valid for 24 hours) and serves files via wireSendFile(). Double Opt-In (DOI): Optional support for DOI to verify email addresses before sending the file. Automated Emails: Automatically sends the download link (or attaches the file directly if preferred). AJAX Ready: Comes with built-in Alpine.js support for seamless, reload-free form submissions. Lead Management: Logs all subscribers (Email, IP, Timestamp) to a custom database table (leads_archive). Admin Interface: View leads and export them to CSV directly from the ProcessWire backend. Easy Integration: Render the form with a single line of code. How to use: Install the module. Create a page (e.g., using a lead-magnet template) and upload your file to a file field. Output the form in your template: // Render the subscription form (default field: 'lead_file') // The module automatically handles success/error messages and styling. echo $modules->get('WireMagnet')->renderForm($page); // OR: Render for a specific field (e.g., if you have multiple magnets or custom field names) echo $modules->get('WireMagnet')->renderForm($page, 'my_custom_file_field'); // OR: Override the button text manually echo $modules->get('WireMagnet')->renderForm($page, 'lead_file', 'Send me the PDF!'); Configuration: You can configure the sender address, email subject, DOI settings, and styling preferences (like button text) in the module settings. Download & Source: GitHub: https://github.com/markusthomas/WireMagnet Modules Directory: later I'm looking forward to your feedback and suggestions! Cheers, Markus
-
- 16
-
-
-
@szabesz Thanks, I was able to duplicate that also. I couldn't figure out how to fix it, but @diogo had a look and came up with a solution. It should be on the dev branch now. Please let me know if you still run into the issue.
-
Awesome! Yes, Opus 4.5 is really good now with PW. It also helps a lot that they have implemented the LSP in Claude Code directly. Honestly, at this stage I don't think we even need to feed docs to it anymore. Just instructions to explore the relevant API methods for a task itself itself in the codebase. Is there a specific reason why you implemented that as MCP and not as Skill? MCPs eat a lot of context. Depends on the implementation, of course. So dunno about how much context Octopus occupies. ATM I have some basic instructions in CLAUDE.md that explain how to bootstrap PW and use the CLI through ddev for exploration, debugging, DB queries. That makes a big difference already. Opus is great at exploring stuff through the PHP CLI, either as one-liners or as script files for more complex stuff. Here's my current instructions: ## PHP CLI Usage (ddev) All PHP CLI commands **must run through ddev** to use the web container's PHP interpreter. ### Basic Commands ```bash # Run PHP directly ddev php script.php # Check PHP version ddev php --version # Execute arbitrary command in web container ddev exec php script.php # Interactive shell in web container ddev ssh ``` ### ProcessWire Bootstrap Bootstrap ProcessWire by including `./index.php` from project root. After include, full PW API is available (`$pages`, `$page`, `$config`, `$sanitizer`, etc.). **All CLI script files must be placed in `./cli_scripts/`.** **Inline script execution:** ```bash ddev exec php -r "namespace ProcessWire; include('./index.php'); echo \$pages->count('template=product');" ``` **Run a PHP script:** ```bash ddev php cli_scripts/myscript.php ``` **Example CLI script** (`cli_scripts/example.php`): ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); // PW API now available $products = $pages->find('template=product'); foreach ($products as $p) { echo "{$p->id}: {$p->title}\n"; } ``` ### PHP CLI Usage for Debugging & Information Gathering Examples **One-liners** — use `ddev php -r` with functions API (`pages()`, `templates()`, `modules()`) to avoid bash `$` variable expansion. Local variables still need escaping (`\$t`). Prefix output with `PHP_EOL` to separate from RockMigrations log noise: ```bash # Count pages by template ddev php -r "namespace ProcessWire; include('./index.php'); echo PHP_EOL.'Products: '.pages()->count('template=product');" # Check module status ddev php -r "namespace ProcessWire; include('./index.php'); echo PHP_EOL.(modules()->isInstalled('ProcessShop') ? 'yes' : 'no');" # List all templates (note \$t escaping for local var) ddev php -r "namespace ProcessWire; include('./index.php'); foreach(templates() as \$t) echo \$t->name.PHP_EOL;" ``` **Script files** — preferred for complex queries, place in `./cli_scripts/`: ```php // cli_scripts/inspect_fields.php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $p = pages()->get('/'); print_r($p->getFields()->each('name')); ``` ```bash ddev php cli_scripts/inspect_fields.php ``` ### TracyDebugger in CLI **Works in CLI:** - `d($var, $title)` — dumps to terminal using `print_r()` for arrays/objects - `TD::dump()` / `TD::dumpBig()` — same behavior **Does NOT work in CLI:** - `bd()` / `barDump()` — requires browser debug bar **Example:** ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $page = pages()->get('/'); d($page, 'Home page'); // outputs to terminal d($page->getFields()->each('name'), 'Fields'); ``` ### Direct Database Queries Use `database()` (returns `WireDatabasePDO`, a PDO wrapper) for raw SQL queries: ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); // Prepared statement with named parameter $query = database()->prepare("SELECT * FROM pages WHERE template = :tpl LIMIT 5"); $query->execute(['tpl' => 'product']); $rows = $query->fetchAll(\PDO::FETCH_ASSOC); // Simple query $result = database()->query("SELECT COUNT(*) FROM pages"); echo $result->fetchColumn(); ``` **Key methods:** - `database()->prepare($sql)` — prepared statement, use `:param` placeholders - `database()->query($sql)` — direct query (no params) - `$query->execute(['param' => $value])` — bind and execute - `$query->fetch(\PDO::FETCH_ASSOC)` — single row - `$query->fetchAll(\PDO::FETCH_ASSOC)` — all rows - `$query->fetchColumn()` — single value **Example** (`cli_scripts/query_module_data.php`): ```php <?php namespace ProcessWire; include(__DIR__ . '/../index.php'); $query = database()->prepare("SELECT data FROM modules WHERE class = :class"); $query->execute(['class' => 'ProcessPageListerPro']); $row = $query->fetch(\PDO::FETCH_ASSOC); print_r(json_decode($row['data'], true)); ``` ### ddev Exec Options - `ddev exec --dir /var/www/html/site <cmd>` — run from specific directory - `ddev exec -s db <cmd>` — run in database container - `ddev mysql` — MySQL client access
-
Taskbar Icon Overlay (custom little Windows 11 program)
Jonathan Lahijani replied to Jonathan Lahijani's topic in Pub
@BrendonKoz The problem with that option in the screenshot is that while it ungroups the taskbar items, it keeps the "text" part of it, which I don't want because it's not necessary for me and I like to have a lot of windows open so I want to conserve horizontal space. Windows 10 used to have that option, but they removed it in Windows 11. That's why you have to use this Windhawk mod I mentioned in the readme: https://windhawk.net/mods/taskbar-grouping A registry setting alone won't fix it unfortunately. Come on Microsoft! -
Fieldtype module, field names cannot be used in selectors
thei replied to thei's topic in Module/Plugin Development
next effect: mapping of fieldnames to true columns names has also be handled by overloading getMatchQuerySort() of FieldType private function mapColumnNames($fieldName) { $subfieldMap = [ 'date_from'=>'data', 'date_to'=>'to']; $col = array_key_exists($fieldName, $subfieldMap) ? $subfieldMap[$fieldName] : $fieldName; return $col; } /** * adapts the getMatchQuery() of the parent by mapping the column names */ public function getMatchQuery($query, $table, $subfield, $operator, $value) { return parent::getMatchQuery($query, $table, $this->mapColumnNames($subfield), $operator, $value); } /** * adapts the getMatchQuerySort() of the parent by mapping the column names */ public function getMatchQuerySort(Field $field, $query, $table, $subfield, $desc) { $col = $this->mapColumnNames($subfield); // return PW internal sort query string return "_sort_{$field->name}_{$subfield}.{$col} " . ($desc ? 'DESC' : 'ASC'); } Welcome to the PW reverse engineering club - Happy hour wednesday 17-18 pm -
In need for a Media Manager solution
Stefanowitsch replied to Stefanowitsch's topic in General Support
Until we get an "official" media manger module we need to make some workarounds. Let me tell you about my personal solution for this: I am using the FileMover module from @Robin S for copying images from a global "media library" field (that is placed inside a dedicated "media library" template ) to any of my image fields. Please have look at robins comment here where he extended the functionality of his module through a hook. In this case you can open the image library page through a modal with a click from any image field. There is also a small screencast that shows this – for me this is a really good workaround. Please have a look for yourself and give it a try (and some credits to robin!). -
timezone FieldtypeTimezone - Dynamic Timezone Field with DST Support
adrian replied to maximus's topic in Modules/Plugins
Thanks for this @maximus - timezone DST changes are definitely an annoyance in development. I am curious though why you have a limited set of timezones available, rather than the complete set? I feel like it might be particularly problematic if you rely on a service like https://ipapi.co/ to determine the user's timezone from their IP address. Many of the timezones returned from that are not likely to match your list. I can see that the way you have organized them makes it much simpler for user selection, and maybe that is your primary goal but I still wonder about how it might impact its functionality. -
@thei Glad you got it working. It should be possible to use an array for this, but I might be forgetting something about it, as I think it's been a long time since I used one for this. In any case, it's definitely better to use a WireData object (or one derived from it) because ProcessWire can track changes to the properties in the object. Whereas there's no change tracking built into an array.
-
I have a website where the client can set different colors via input fields on a page in the backend. I want to make use of those colors as CSS vars to use them in my stylesheets. I am doing it this way: <style> :root { --primary-color: <?=$globalSettings->bg_colorcode?>; --secondary-color: <?=$globalSettings->font_colorcode?>; --tertiary-color: <?=$globalSettings->titlefont_colorcode?>; } </style> Then I can simply "grab" those variables in my stylesheets: header { background: var(--primary-color); } I am using UIKit and LESS and this is working for me.
- 1 reply
-
- 3
-
-
Hi @kongondo Happy New Year. It's been a while since anything has happened here on the subject of ‘Next’. Since there are two major projects planned for this year where I would be needed for MM, I wanted to ask what the status is? 😊