Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

4 Neutral

About ttttim

  • Rank
    Jr. Member
  • Birthday 09/07/1989

Profile Information

  • Gender
  • Location
    Utrecht, Netherlands

Recent Profile Visitors

1,663 profile views
  1. Thanks @kixe and @elabx I'm gonna look in to those option!
  2. I've seen some really nice colorpickers out there but I don't want the user to pick any color just the ones I select. Or is there a simple way to disable the JS colorpicker from https://modules.processwire.com/modules/fieldtype-color-picker/?
  3. I'm using a Select Option field for a user to select a color by name. In the back-end the radio buttons are showing the title of the color but the actual value (the Hex) can't be traced using the Inspector. Is there a way to hook into the Radio input field to add the Hex value if one is selected? I'd like to add the selected color to the background of the field after save.
  4. I was recently experimenting with optimizing my images to get better load results. The code below is an example of what i've been using. It works nicely but the main problem is if i load a page for the first time after having added a few images my server will overload and return a 503 error. I have to refresh the page a few times for the server to resize all the images. Not a big problem while developing but not something I want on my live website. <picture> <source media='(max-width: 320px)' srcset='{$image->width(320)->url} 1x, {$image->width(640)->url} 2x'> <source media='(max-width: 375px)' srcset='{$image->width(375)->url} 1x, {$image->width(750)->url} 2x'> <source media='(max-width: 767px)' srcset='{$image->width(750)->url} 1x, {$image->width(1500)->url} 2x'> <source media='(max-width: 1023px)' srcset='{$image->width(300)->url} 1x, {$image->width(600)->url} 2x'> <source media='(max-width: 1319px)' srcset='{$image->width(450)->url} 1x, {$image->width(900)->url} 2x'> <source media='(min-width: 1320px)' srcset='{$image->width(510)->url} 1x, {$image->width(1020)->url} 2x'> <img src='{$image->width(1056)->url}' alt='$image->description'> </picture>"; Is there a way to create these different sizes without overloading my server? Ideally i'd like to expand the above code with webp support and a service like tinyPNG to reduce image size even further, but that would stretch the first load time even further.
  5. Is there a way to add a (new or existing) page to the top of the asmSelect list? By default they're added at the bottom.
  6. I have a table field with a DateTime field inside. Everything works fine as long as a select a date in 2019 but when adding a new row with a date in 2020 (or further) the date changes to 2019 after i save the page. Any ideas?
  7. Someone recently pointed to me that I wasn't using http strict transport security header. From what I've read it forces a connection to https instead of http. Is there a different compared to the use of the default method from the ProcessWire .htaccess? RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  8. Hi, I'm working on a website where in the back-end in one template i have multiple page reference fields using the same conditions (parent and template). Is there a way if i selected a page in field A it won't show up anymore in the list of field B or field C etc? I was looking at creating a custom string but i couldn't wrap my head around it.
  9. Thank, that worked like a charm! I had to switch $key and $value though. $page->of(false); foreach($images_sorted as $key => $value) { $page->images->get($value)->sort = $key; } $page->images->sort('sort'); $page->save();
  10. I'm building an upload form for user to add images to a page. I would like for the user to change the image order after they add the images. Basically how the image field in the backend works. So users can drag and drop the image order. The problem is that I don't know how to rearrange the data of my image field based on the order a user submits?
  11. And still you where able to answer my question! sort=parent.title Is what i was looking for.
  12. I have an event page were you can select multiple sub-categories with a page field using checkboxes. Now i want to display all the sub-categories but also have them sorted by their parent category. I tried something lik below but that didn't work. $tags = $event_cat->find("sort=$event_cat->parent"); foreach ($tags as $tag){ echo $tag; } Any ideas?
  13. Thanks for your answer but i'm not sure if i follow. What do you mean with the last bold part?
  14. I have a parent page containing a list of it's children. When you click on one of the children the page opens up in a modal box trough ajax. So far so good. But if i directly load the page through the url (parent/child) i get the child page. Is there a way of loading the parent page instead with the child page opened inside the modal box? I was first thinking of using URLSegments so it would load the parent page with the child name as segment however since the segment is an actual page it will load the page instead. Any ideas?
  • Create New...