Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/31/2021 in all areas

  1. This week we have a new master/main version released after a full year in the making. With nearly 40 pull requests, hundreds of new additions and more than 100 issue reports resolved, this new version has a ton of great new stuff and we’ll cover most of the new stuff here— https://processwire.com/blog/posts/pw-3.0.184-master/
    2 points
  2. HI, Magic thanks - no donations, just delighted to get feedback! Cheers, Chris
    1 point
  3. Hey @Zeka To be honest what you're currently doing sounds like a reasonable solution, and also goes beyond what I've personally ever done/needed. In most projects I've got a handful of components — I think around ten or so at most — so splitting them into directories hasn't really been worth it. Boils down to preference, really; I tend to use partials for most things, and components only when I really need the power (and complexity) they add ? So, long story short: there's no built-in way to split components into directories, but that's not a bad idea (after all that's always been there for partials), so I've added it to my list for now.
    1 point
  4. New Release! Added support for latest stable ProcessWire version 3.0.184
    1 point
  5. Hey @Peter Knight All redirects are 301s, unless they are timed.
    1 point
  6. i was curious, this worked for me: https://jsfiddle.net/3L0cdjsj/5/ -- removed -- You can change the description (item_name) and the price (amount) and you can use a button in your own style that fits to your website.
    1 point
  7. To be a bit more secure or serious, you want to check if everything went ok, before you delete all images on the old page. If I undestood right, the new page images should be an exact copy of the old one. Therefore we can delete all (optionally) images on the new page first. Then, after adding all images to it, we compare both collections. When on PHP >= 5.6.0, we can compare the ->items(), what contains a list of all image basenames, what is fine! If we, unfortunately, on PHP lower then 5.6, we can at least compare the count of images, or have to loop through both collections and compare the basenames one by one. $pageNew->of(false); $pageNew->images->deleteAll(); $pageNew->save(); foreach($pageOld->images as $image) { $pageNew->images->add($image->filename); } $pageNew->save(); // now check for success or failures $success = version_compare(phpversion(), '5.6.0', '>=') ? $pageNew->images->items() === $pageOld->images->items() : $pageNew->images->count() === $pageOld->images->count(); if($success) { // delete images on old page $pageOld->of(false); $pageOld->images->deleteAll() $pageOld->save(); }
    1 point
×
×
  • Create New...