Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/21/2022 in all areas

  1. This is in the selector docs, right were you would expect it ? Granted, the page is pretty long and cluttered when you’re just scrolling through, but it’s great for CTRL+F’ing and the table of contents at the top is very helpful. Mostly “find“ means “I have some criteria, give me any pages that match it” (only those the user may view, by default). “Get” means “I know exactly which page I want, give it to me”. Get gives you one specific page, Find gives you multiple. There is also pages()->findOne() if you only want a single page – the difference here is that this will check if you have access first, while pages()->get() will always give it to you if it exists, even if it’s unpublished or hidden. Anyway, rock on! I’m sure you will be enjoying PW for years to come ?
    3 points
  2. With the ease of Processwire in my hands I feel I can almost do anything to make the website of my dreams ? It's actually getting easier by the day to just not rushing into things and start to think about structure first. Now I am focused what I want to display, later on how to make it look. But there are still some things I do not find with ease on the PW docs. For example, possibilities for sort. By mistake I found out sort=-title (minus sign), is actually sorting on title from Z to A. Another thing is, the difference between Finding and Getting pages it beyond me. Could not found it, did not get it ?. Right now, I am developing a website as affiliate. This means I display product redirecting to certain sellers. But my children have a large part in it: they enhance the look, improve images, test things, and give feedback. My steps to a professional website so far: Getting to know Processwire, so much information to grab. I now know, at install, the code on the pages are examples, not mandatory! Structure files in the root of the website first. Then templates, and pages - according to my idea (what is logic and what is not handy in my situation. Find a template to use with ease: I have found a great free HTML bootstrap 5 template that I use right now. Try behavior design: what would you do on this website you are looking at right now? Take regular breaks, don't try to push things in a limit time, do not make it difficult. But the main thing is: Processwire is so much fun to develop websites (no joke) 10+ for PW. Enjoy
    2 points
  3. That means that your module is initialized 3 times and it does not have the setting "singular" to true. You can have singular modules that should only be initialized once (like rockfrontend for example) or non-singular modules, that can be initialized several times (like for example all the inputfield modules, where you want to use one module several times with different settings). // site/ready.php $wire->addHookAfter("Page::render", function(HookEvent $event) { bd("hook fired"); }); I just tried this hook in ready.php and everything works as expected. Just do that on your end and than change things step by step towards your desired solution. Once things break you know where the bug sits and you can fix it. Or as for help with a more detailed error description. How to you initialise your module? Manually? Or is it an autoload module? Did you read the docs about modules? https://processwire.com/docs/modules/development/
    1 point
  4. I hope you are having a great week. Today I've released new versions of two ProcessWire ProFields modules: Table and Combo. In addition to various minor improvements and fixes, the biggest update in both is the addition of file and image fields. Since this is a fairly major feature addition for both modules, please consider these versions in a beta test stage for the moment. Both are available for download in the ProFields board now. Table v23 In ProFields Table both "file" and "image" column types were added. These are fairly basic file upload fields, but a major improvement over not having them at all. It can hold one file per column per row in the table. You can have as many file columns as you need per row. The front-end value of your file or image columns is one you are likely used to using already: Pagefile or Pageimage objects, just like they would be in a regular single-file or image field. This means your file/image values in your Table rows can benefit from many of the built-in methods you already use, such as the ability to present resized images, WebP variations, etc. When you configure a file column you can specify what extensions you want to allow and the maximum number of bytes you are willing for it to accept in an upload. When configuring an image column, you also gain settings to specify the thumbnail image preview size in both regular and HiDPI resolution. Combo v9 The update for Combo fields was similar to the Table field except that file and image fields go quite a bit further in Combo than they could in Table. Specifically, you get almost the full set of InputfieldFile/InputfieldImage configuration settings and features, including the ability to support both single and multi-file uploads, image actions, variations, focus control, description input, tags input and more. The only things missing relative to a regular File/Image field are the manual Crop action (Image field) and the ability to manage separate custom fields for each file or image. The front-end value for your Combo file fields is identical to what it would be on a regular ProcessWire File or Image field. Specifically a Pagefiles or Pageimages (plural) object if supporting multiple files, or a Pagefile or Pageimage (singular) object if supporting 1 file. To say it another way, you can use this exactly as you use other dedicated file/image fields in ProcessWire. Not yet included is the ability to query the properties of a file/image field from selectors, like when using $pages->find(). I'm still working on that part, but since I know most probably don't need that I decided to get this version out first and then continue working on that part. Core updates The core updates this week were mostly minor, even if there were a lot of them. One of the ways that I stay up-to-speed on all the core code is to regularly read through all of it and make small adjustments along the way... anything that makes the code easier to read, or easier for PhpStorm to inspect it. You've seen these kinds of updates pretty much every week for years, but I hadn't thought to mention it before. This week there were more of these kinds of updates than usual so I just wanted to mention that what it's for. What sometimes looks like micro-optimization or minor code changes is usually just me staying fresh and up-to-date with the core. ? That's all for this week. I hope you have a great weekend!
    1 point
×
×
  • Create New...