Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/16/2019 in all areas

  1. ProcessWire added WebP image support this year and many have been adopting it enthusiastically in existing projects. In this post we’ll look at a process used for migrating an existing website to use WebP images. We’ll cover everything from preliminary considerations to implementation and testing, with lots of tips and tricks along the way— https://processwire.com/blog/posts/webp-images-on-an-existing-site/
    10 points
  2. https://www.comedywildlifephoto.com
    3 points
  3. For a front-end search form? One strategy I often use is concatenating the selector one input field at a time. Just make sure your add your validation. Something like this: $selector = ''; if($place = sanitizer()->selectorValue($input->post->place)) { $input->whitelist('place', $place); $selector .= ", place%=$place"; } if($input->post->doctor) { $input->whitelist('doctor', $input->post->doctor); if($input->post->doctor == '1') { $selector .= ", name=jim"; } elseif($input->post->doctor == '2') { $selector .= ", name=jon"; } elseif($input->post->doctor == '3') { $selector .= ", name=jake"; } } $limit = 12; $template = doctor; $parent = doctors; $selector .= ", sort=sort, limit=$limit"; $selector = "template=$template, parent=$parent" . $selector; $results = pages()->find->($selector);
    2 points
  4. @iipa You probably have to update PW. It was introduced with 3.0.127: https://processwire.com/blog/posts/pw-3.0.127/
    1 point
  5. Thanks – this should now be fixed in the latest version (2.2.2).
    1 point
  6. From the docs https://code.google.com/archive/p/jquery-asmselect/ addItemTarget: Where to place new selected items that are added to the list. Allowed values: 'top' or 'bottom' Default: 'bottom'
    1 point
  7. Here is what i see (Firefox, Windows 10): Yes, that is what i meant. I am looking forward to this feature.
    1 point
  8. Yep) There is a link to process module that is broken "by default" if the process module is not installed. And I would guess most of the time users would expect an admin page to be in place after installation for such a module. Maybe reconsider and make it auto installed?
    1 point
  9. I know this is an old thread, but since it looks unsolved I thought I would share what worked for me in case people are searching the forums. Here are the steps I took: renamed mystyles.js to customstyles.js located at site/modules/InputfieldCKEditor/customstyles.js edited customstyles.js to change the text from mystyles to customstyles.... CKEDITOR.stylesSet.add( 'custom-styles', [ edit the field settings for the field to point to the new customstyles.js The problem for me was that I needed to change the prefix as well from mystyles:/site/modules/InputfieldCKEditor/customstyles.js to customstyles:/site/modules/InputfieldCKEditor/customstyles.js They have to match the file name. Hope that helps someone.
    1 point
  10. $pages->addHookAfter('saveReady', function($event) { $pages = $event->object; $page = $event->arguments(0); //check if on template if($page->template == 'item') { //is the checkbox checked to add children if ($page->add_children == 1) { //get the values in the page field type field foreach ($page->page_assignment as $child) { //if selected pages have childen if ($child->numChildren > 0) { //loop through those children foreach ($child->children as $grandchild) { //set values. $page->page_assignment->add($grandchild); } } } } } I figured it out. Two things to change if anyone is looking to do the same. 1. Use the right hook. saveReady instead of save. 2. Add the page object. $page->page_assignment->add($grandchild);
    1 point
×
×
  • Create New...