Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


3fingers last won the day on March 8

3fingers had the most liked content!

About 3fingers

  • Birthday 04/22/1981

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Turin, Italy

Recent Profile Visitors

5,633 profile views

3fingers's Achievements

Sr. Member

Sr. Member (5/6)




Community Answers

  1. What about: $pages->findOne('page_reference=value') Not tested but findOne method should return just the first occurence of the page array.
  2. May I ask you why are you trying to resize svg? Svg are scalable by nature, so my personal approach you be to size them via css or html attributes on the svg tag itself.
  3. // Get images of the author if they exist if count($page->images): echo $page->images->each(function($image) { return "<li><a href='$image->size(100,100)->url'>$image->description</a></li>"; // Just an output example }); // Otherwise get images of their book covers else: foreach($page->page_ref_for_their_books as $all_pages): foreach($all_pages->images as $image): echo "<li><a href='$image->size(100,100)->url'>$image->description</a></li>"; endforeach; endforeach; endif;
  4. Looking at your pseudo-code you're outputting a single image (the first one) from the page reference field, so you don't need to loop through it. // Get images of the author if they exist if $page->images !='': foreach $page->images as $source: echo $source->size(100,100)->url; endforeach; // Otherwise get images of their book covers else: $source = $page->page_ref_for_their_books->images->first; echo $source->size(100,100)->url; endif;
  5. You can translate your "C" inside admin translation files, the right one is: wire--modules--languagesupport--languagesupport-module for each language you can define the setting there. More on setlocale here, if you want to set it via api: Docs
  6. You can configure your locale, according to your server settings, inside site/config.php like this: setlocale(LC_ALL, 'it_IT.UTF-8'); // where 'it_IT.UTF-8' is MY locale setting. You can find a list of all locales here on Stack Overflow
  7. <img src="<?= $page->my_image_field->url ?>" alt="<?= $page->my_image_field->description ?>"> // never forget to add "alt" attribute here In your example the "url" property was missing.
  8. This looks really cool but I have to admit that I would have to look at the code to really understand what's going on 🙂 It looks like you are mastering htmx a lot lately, nice job!
  9. Just to be on the safe sife I would try to get those input variables like this: // On the php file whom handles your inputs (REMEMBER, IT HAS TO BE PLACED OUTISDE THE "template" folder) $page_id = $input->get->int->pageid; $status = $input->get->text->status; Moreover, as a test I'd try to use a relative path for your ajax call: $.ajax({ type: "GET", url: "./../ajax/file.php", // or wherever your file is placed/called data: { pageid: ckVal, status: ckStatus }, success: function(){ console.log(this.url); } Let us know 🙂
  10. Try: $wire->addHookBefore('Pages::saveReady', function($event){ $page = $event->arguments(0); if($page->hasField("my_checkbox")) { if($page->my_checkbox == 0) { $page->setAndSave('another_integer_field',0); $this->message("This should have worked"); //for debugging only } } });
  11. @kongondo Here I've found an interesting article about SSE and php and one thing mentioned, to avoid session locking (which I think its our culprit here) is to use: // make session read-only session_start(); session_write_close(); Above everything else in the code used to send data. I cannot test it at the moment, would you mind to have a check and report it back to us? 🙂 I've found however possible bad implications doing this, as mentioned here in the forum.
  12. I think the best approach would be to use css ::first-line pseudo selector for that.
  13. Actually is not. PageTable (which is in the core but disabled by default) is not the same as Pro Field Table :)
  • Create New...