Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/04/2026 in all areas

  1. Is "race" the only template that can be used for children of your page? If so you could instead use the name format to skip the Page Add step
    1 point
  2. Hi everyone, I'd like to share a module I've been working on: WirePDF — a PDF generation module with full UTF-8 and Cyrillic support. What it does Adds a toPdf() hook to any page, so generating a PDF is as simple as: $page->toPdf(['filename' => 'document.pdf']); You can also pass custom HTML, use a dedicated template file, or save the PDF directly to disk. Key features Two engines: mPDF (recommended) and Dompdf Full field support: all native PW fields + ProFields (Table, Repeater, RepeaterMatrix, Combo) Typography: 14 fonts including DejaVu Sans for multilingual/Cyrillic content Headers & footers with {PAGENO}, {nbpg}, {DATE}, {sitename} variables Watermarks, password protection, configurable margins and paper sizes Logging via ProcessWire's built-in log system (Setup > Logs > wirepdf) Installation cd /site/modules git clone https://github.com/mxmsmnv/WirePDF.git cd WirePDF composer install Then install via Modules > Refresh in the admin. GitHub: https://github.com/mxmsmnv/WirePDF Feedback and bug reports welcome!
    1 point
  3. Hey ProcessWire friends! @protro asked something about Strapi in another thread, so I did a quick research on how to build a basic frontend for content stored in Strapi and found this 20+ video on youtube: Now, don't get me wrong, Strapi is cool and all and the video is really great, but I couldn't help but chuckle thinking about how we do basically the same in ProcessWire. Here's our "epic" version: <?php foreach($pages->find('template=faq') as $faq) { echo "<div><h2>{$faq->question}</h2>{$faq->answer}</div>"; } Boom! Done in a few lines. No need for popcorn or a comfy chair. ? Cheers to simplicity and efficiency! ? #ProcessWireFTW #KeepItSimple #LessIsMore
    1 point
  4. If you prefer one-liners: <?php // https://processwire.com/api/ref/wire-array/each/ echo $pages->find('template=faq')->each("<div><h2>{question}</h2>{answer}</div>\n"); ?
    1 point
  5. Yes, it would for sure. I recall that Ryan was talking about making the PW API available through JS some years back. That would be exactly what we need. A RESTful API like the WP REST API in ProcessWire. This should ideally be available as an optional core module and support all Pro fields.
    1 point
  6. A little heads-up: WirePDF ≠ WirePDF I am in the process of upgrading a pretty old project, still running 3.0.240. I wanted everything up to date from ProcessWire to each and every module. So I was happy to see new version of WirePDF and went with it. Right after finishing the installation error messages showed up, Pages2Pdf broke and was messing with me, PDF generation threw errors, and so on. I started digging and found the problem: the listed update belongs to a totally new module called WirePDF (by @maximus) and has nothing to do with the file in the Pages2Pdf module folder. So there is a weird name collision and hijacking of the old module happening in the ProcessWire Upgrade (by @ryan) module right now.
    0 points
×
×
  • Create New...