Jump to content

Sergio

Members
  • Posts

    530
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by Sergio

  1. One thing is to load the search result in memory on PHP side on a $pages->find, another is render the HTML in the browser. There's no way to render a HTML node tree of that size without some solutions like image lazy loading through a script, especially on mobile browsers. Nowadays it's partially supported natively, but for most cases you need to rely on Javascript. Google Images loads more images as you scroll the page, you can see this better if you slow down your connection using Chrome Devtools, for instance.
  2. In the near future I plan to study on using Teppo's module to build an index directly to a Meilisearch instance running on the same server. I used it on a recent Laravel project and, although I only scratched the surface of its capabilities, the partial match and typo toleration is worth a try IMHO. Also it was a breeze configuring it.
  3. There's also this cool module by @teppo that let you create a search index to speed up things immensely on some cases. https://modules.processwire.com/modules/search-engine/
  4. I am also planning to do that in the near future, I download a couple of apps and also will explore this: https://code.visualstudio.com/docs/remote/codespaces
  5. Here's an example of a basic module to store each download as a row on a separate table. I hope it can be useful somehow ? And here's how to call it from your template, form hook etc.: $download_counter = wire('modules')->get("ExternalDownloadCounter"); $download_counter->countDownload($page_name, $resource_file, $selected_language);
  6. Yep, that's the challenge indeed. I need to take a look at how Klaro does that, as mentioned by @gebeer.
  7. Hi @joshua, thank you for this great module! Would you consider a suggestion to enable an "option out" approach on the check-boxes. I know this is controversial, but some clients insist on having this. Another question, do you know if there's a way to have a granular control on the scripts loaded by Google Tag Manager?
  8. Super nice! I'm more of a Hugo user, but I have to take a look on 11ty for a next project.
  9. Welcome to the forums! I'd suggest you take a look at this (pro) module by Ryan: It may save you a lot of time and possible headaches :)
  10. Hi Kathleen! Welcome to the forums. For the blogposts pages content, you need to import the database from the server. But for the assets (files folder inside templates/assets/) there's a technique to get them using hooks like Ryan shows on his post: https://processwire.com/blog/posts/pw-3.0.137/
  11. There's also a shortcut: if (!$p->isUnpublished()) :
  12. <?php $p = $pages->get(1241); if (!$p->is(Page::statusUnpublished)) : ?> <a href="<?php echo $p->url() ?>"><?php echo $p->title() ?></a> <?php endif; ?> https://processwire.com/api/ref/page/status/
  13. Your problems are gone! :) https://modules.processwire.com/modules/connect-page-fields/
  14. Actually is the other way around, the document template should NOT have a PHP file. So on the Human Resource page, you can loop though its children and display the info you need. I guess is the document title, link to download etc.
  15. /documents/human-resources/ is a page accessible because it has a template file and is published. If you set, to its children, a template that does not have a template file (.php), they will not be accessible directly. So you can use the API to get their content and show to the user. So: /documents/human-resources/ works /documents/human-resources/document-name will get a 404
  16. This worked for me: <?php namespace ProcessWire; include("../index.php"); //bootstrap ProcessWire // var_dump($wire->pages); $http = new WireHttp(); var_dump($http);
  17. I had the same problem, hope this will help someone. :) I have a multi language website with templates containing a page field called Tags, that the user can create on the fly. Here's a quick way to activate the secondary languages when a new tag is created, using the cool IftRunner module. Install the module https://github.com/ryancramerdesign/IftRunner Create a .module name inside /site/modules/IftRunner using the code below. Install this module "IftActionActivePageLanguages" you just created Go to Setup > Trigger/Action inside the admin dashboard Create a new trigger for a "Pages::saved" hook like the one shown in the screenshot.
  18. One of my client's website is running on Nginx : https://ricardo-vargas.com It works, but I think a better approach in most cases is to run Nginx as a reversed proxy with Apache serving the files, like I did for my other client: https://www.brightline.org. You get the benefits of easier configuration and a better performance (compared to only run Apache).
  19. You don't need to mess around gulp etc anymore if you don't wanna. Give https://prepros.io/ a try. After I switched from Mac to Windows, I missed Codekit and Prepros is a good alternative. :) Also runs on Linux (as it's an Electron app).
  20. $i=1; foreach($xml->branches->branch->properties->property as $property) { if($property->bullet1 != '' && $i <= 20) $bullets .= "{$property->bullet.$i}\n"; $i++; } Like this or I am missing something?
  21. Oh yeah! A solid color is the way to go. ? much more secure afaik
  22. I had to find a way to use a person's head shot that was too small (640px) for print collaterals. Found https://letsenhance.io that uses machine learning to upscale an image and also do other improvements. It blew my mind! This is pure "black magic" :) See attached example from their blog. And I also recommend https://www.remove.bg/ for removing backgrounds. Incredible quality also.
×
×
  • Create New...