Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. Hi, i try to put it short. I have a search form which has several (named, multidimensional) filter groups to narrow down the results. Form method is GET. Example filter group, limited to only 2 filter options: <ul> <li> <input name="type_of_audience[adults]" id="adults" class="input-checkbox" type="checkbox" value="1" <?php if(isset($_GET['type_of_audience']['adults']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Adults </label> </li> <li> <input name="type_of_audience[children]" id="children" class="input-checkbox" type="checkbox" value="2" <?php if(isset($_GET['type_of_audience']['children']){ echo "checked"; } ?> /> <label for="adults" class="label-checkbox"> Children </label> </li> ... other options ... </ul> After submitting the form, the results are fine and the active checkboxes stay being checked. The query string looks like this: http://<local-path>/?type_of_audience[adults]=1&type_of_audience[children]=3 If the result is bigger than the query limit, so that the pagination is shown, the pagination query string differs from the above. It then looks like this: http://<local-path>/page2?type_of_audience=1,3 However, the result pages are valid/correct. But as i lost the keys of the filtergroup, i see no way to retain the checked status of the active checkboxes. So, my question is: Is there anything i can do about it? Or do i miss something or just think in the wrong direction? Thx in advance, regards Olaf
  3. Today
  4. @nbcommunication Don’t you mean it would terminate at 1024? That’s the next stop down from the 2000 original width.
  5. InputfieldTextTags is perfect for such things: https://processwire.com/blog/posts/pw-3.0.177/
  6. Hi, this is an easy way to have beautiful icons in the languages switcher: <?php foreach ($languages as $language) { if (!$page->viewable($language)) continue; // is page viewable in this language? if ($language->id == $user->language->id) { echo "<span style='padding:3px;border-bottom:1px solid #333'> "; } else { echo "<span style='padding:3px'> "; } $url = $page->localUrl($language); $hreflang = $homepage->getLanguageValue($language, 'name'); $lan = $language->title; $it = '<img src="' . $config->urls->templates . 'images/italy.png" style="width:30px"/>'; $en = '<img src="' . $config->urls->templates . 'images/gb.png" style="width:30px"/>'; if ($lan == 'IT') { echo "<a hreflang='$hreflang' href='$url' >" . $it . "</a></span>"; } else { echo "<a hreflang='$hreflang' href='$url'>" . $en . "</a></span>"; }; } ?> Bye!
  7. This resources list might also help you to get started: https://processwire.com/talk/topic/26720-using-echo-with-delayed-layout/#comment-221298
  8. This is a nice showcase to demonstrate that even one of the oldest tutorials are still relevant today. ProcessWire is evolving in a way that basics never change and even backwards compatibility can be relied upon. Sure bugs come and go, but there is no complex software without bugs. Anyway, my recommendation form 2019: Not to mention: https://www.pwtuts.com/tags/ And some up to date tudorials from 2022: https://www.youtube.com/channel/UCvp33AwVHgFKgsrGaLh-ANg/videos Hope this helps.
  9. @Gideon So and @3fingersWell in fact I create a field in my admin board. So I added this field to the template and so when I create a page with this template, I insert a category to this field using input text. But It would be better to have a selection field populated by all the children of category. That is why I want to populate this field. Thank you
  10. Hi! I made a little intranet with processwire. If there is a new article a mail containing the URL (https://mysite.com/article/name-of-my-article/) is sended to each user. If the user klicks on the url and he is not already logged in he is now redirected to the login page (in this case a frontend login with Login/Register module). After login he is redirected to the start page but not to the URL from the mail. What is the most simple way to get a proper redirect to the expected URL? Do i have to work with a cookie? Where do i have to write and read this cookie? Thanks!
  11. Hi @uiui, I've added in this option and released v1.0.4. From the README: Use for all dimensions? If enabled, a set rule will be used regardless of whether it is wider or higher than the dimensions of the original image. To use this on a srcset call, enable the allSets option: $srcset = $image->srcset('4096, 2048, 1024, 512, 256', [ 'allSets' => true, ]); // If passing an image 2000px in width, the above would return a srcset with set rules for each given width // Without 'allSets' enabled, the srcset generation would terminate at 4096w I hope that is useful! Cheers, Chris
  12. Hi @uiui, Variations are only generated and used for sizes smaller than the original. When it reaches a dimension where the image does not need to be resized, it 'completes' the generation process. Running your examples on an image 2048px wide gives me: /site/assets/files/1033/very_large_array_clouds.webp 4096w/site/assets/files/1033/very_large_array_clouds.1920x0-srcset.webp 1920w, /site/assets/files/1033/very_large_array_clouds.1600x0-srcset.webp 1600w, /site/assets/files/1033/very_large_array_clouds.1280x0-srcset.webp 1280w, /site/assets/files/1033/very_large_array_clouds.980x0-srcset.webp 980w, /site/assets/files/1033/very_large_array_clouds.480x0-srcset.webp 480w, /site/assets/files/1033/very_large_array_clouds.webp 4096w This is definitely a quirk of the module's implementation that I hadn't considered - all the srcset examples I referred to during development had the sources ordered smallest to largest - and I don't think it is something I can sort in the default implementation. Perhaps I could add an option to disable the automatic completion e.g. 'Generate variations for all srcset dimensions?' Would this be useful for you? Cheers, Chris
  13. Hi @Gideon So Thanks! This will be fixed in the next version, you can ignore them for now, these errors should not break anything. This file is not needed anymore, I will remove the call for the next version. The rest of the errors are webpack related. I must have used the wrong build command, so should be an easy fix..
  14. @Boost I think yes, I never used markup-region, maybe pw-3.0.61 introduced new api functions or markup-regions things which are required from there. https://processwire.com/blog/posts/processwire-3.0.39-core-updates/ Edit: I read the ProcessWire 3.0.61 core update, I think I am missing some details as I don't use this strategy, but clearly, the region strategy seem to be introduced on this update yes. Let's wait others users to give us more details in this thread.
  15. Something like this maybe? and this:
  16. Wait 🙂 the issue 129 is about processwire 3.0.39, but the page https://processwire.com/docs/front-end/output/markup-regions/ says we need ProcessWire 3.0.61. Are we talking about the same thing?
  17. I was sure I had already saw an update made by @ryan to make SkyScrapers using markup-region (https://weekly.pw/issue/129/). The demo I linked previously is made with it. There you go: https://github.com/ryancramerdesign/skyscrapers2 🙂
  18. It's a nice one, but no markup regions 😞
  19. Thanks for the links, specially the starting with the blank profile one. I didn't know that. The SkyScrapper would be enough, but it doesn't use the Markup regions 😞
  20. Hi @jploch I have the following JS error in the console. Failed to load resource: the server responded with a status of 404 (Not Found) fieldsettings.css Uncaught Error: [HMR] Hot Module Replacement is disabled. at Object.<anonymous> (main.js:1:273800) at Object.<anonymous> (main.js:1:273857) at i (main.js:1:110) at Object.<anonymous> (main.js:1:220711) at Object.<anonymous> (main.js:1:220891) at i (main.js:1:110) at Object.<anonymous> (main.js:1:273910) at i (main.js:1:110) at main.js:1:902 at main.js:1:912 And I see a lot of this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error) __webpack_hmr Any reason why I saw all this error? Gideon P.S. I am using version 0,4 and install in a sub-folder.
  21. Hi @Sten Please give us more details then we can provide better help. Gideon
  22. Hi @Boost I have mentioned this many times. This tutorial from Ryan should get you started. Gideon
  23. Yesterday
  24. There are dozens of quality tutorials and Processwire strategies explained under the Processwire Docs and then there are dozens of more very good tutorials on the internet. So either you are disconnected from Processwire reality or don't know how to use Google. But usually the real issue is that Processwire has unlimited power and freedom under the hood, confusing old habits of making websites. Dive in the Processwire api and make websites with it and many of the questions will melt away. We are here to help you go along.
  25. I still use 2012 code from time to time, it make me also smile when it happen. About the tutorials, a real website, it depend what you call a real website. (I am not being rude, and I get your point, but I think that the tutorials need be done by the community, maybe we should follow an official guidelines). For example, for me, you would need to put your hand in Vite, Svelte, and how to mix them with ProcessWire to get data which mean to build a module that will inject custom headers, or use an internal API, and make yo call ProcessWire Headless cms things. For others devs, it could be other stack / frameworks, and we all know there is a ton of them. So you end up in what PW is the best => freedom, and I think IMO that it will be hard to satisfy everyone. 👇 For beginners, there is some good up-to-date doc, like https://processwire.com/blog/posts/starting-with-the-blank-profile/ and also tutorials - https://processwire.com/docs/tutorials/ - and for a real damn good example real website, the update profile SkyScraper which can be visited there http://demo.processwire.com/ , downloaded, dissected and modified. Maybe, again, the real need is to organize better what's already exist.
  26. Hi, I need to populate a multi selection field with all the children of a template. How would you proceed? Thank you
  1. Load more activity
×
×
  • Create New...