Leaderboard
Popular Content
Showing content with the highest reputation on 10/16/2016 in all areas
-
I think this one little upgrade is worth being mentioned in the blog post. If I get it right, we are finally able to address page save and field save events for the page in one hook! Wow!4 points
-
In addition to our regular core updates, we also have a new ProFields module to introduce to you this week. It’s something a little different that we’ve found pretty useful and think some of you will too. It's also available for download now in the ProFields board. This blog post covers it in detail: https://processwire.com/blog/posts/text-blocks/3 points
-
are you sure the value is blank? Mine works on the closed field, you just can't see the content until you click into the field; The field is still initialized when you open it; not sure if the fact that you can't see the content in the field is due to some initialization issue, or is something specific to how this component works. I'm not sure this can be fixed, so for now i think your options are to either tell the editors to click into the field to see the content, or don't use collapsed fields. In some future iteration of this module, the eventual aim is to have it operate more like CK editor, so that the config takes place from the admin, and each instance can be individually configured; also support for some sort of image input. But i think it will take a while till it reaches that stage, and also would depend on demand...2 points
-
hi kuba2 and welcome hard to say what's wrong... just wanted to give you a tip: install tracy debugger and use the console! it's awesome and will help you to understand everything much better than putting some code into your template files and reloading the browser over and over again. you could do something like this in your case: $p = $pages->get( # your page id # ); d($p->product-img); d($p->product-img->url); if you set your product image to "automatic" it will be an array when you uploaded more than 1 image and a single item when you uploaded only 1 image. in tracy you could easily inspect such things (that's what adrian already said above)2 points
-
Hi, After reading this thread, I decided to make a module that helps generating PDF files of ProcessWire pages. GitHub: https://github.com/wanze/Pages2Pdf Modules Directory: http://modules.processwire.com/modules/pages2-pdf/ This module uses the mPDF library to generate the PDF files. It has fully UTF-8 and basic HTML/CSS support for rendering the PDF files. The output is customizable with ProcessWire templates. Example I've enabled generating PDF files for the skyscraper template of ryans Skyscrapers-profile with a template that outputs the data in a table along with the body text and the images: one-atlantic-center-pdf-4177.pdf Please take a look at the README on GitHub for instructions and further information/examples. Cheers1 point
-
1 point
-
Your $thumbnail is already pretty handy - you could write somthing like $image->size(123, 456)->url but then you would have to repeat the size command all the time. Then, in your last example you have to put the "single-product-wrapper" into the foreach loop, since you want to wrap every product with it .... ‽ ... And what BitPoet said.1 point
-
No, you've removed all the necessary HTML markup. You need to echo that too if you want the output to be the same.1 point
-
Imo it's more clear this way but I can change it if you think it's not. How about bringing back the timeout to go back to the initial state after a few seconds? So hanging deletion states would be automatically cancelled to avoid confusions and other issues.1 point
-
The latest version of mPDF (7.0.0) already supports PHP 7, so it should be just a matter of pulling the latest sources into the module (unless there were breaking changes since 5.7).1 point
-
1 point
-
1 point
-
Sorry for the delay on this - just thinking about it again now. Now that I am using the LIVE option with bd(), I think that we can override depth and length limits completely. I have been playing with a new setting that makes these calls effectively have no limits by setting the depth to 99 and the length to 999999. I have been playing with it a bit here and seems to be great. One thing to keep in mind is that because Tracy's LIVE dump method renders object/array levels as you open them, setting the maxDepth so high won't actually do anything to what you see in an object/array that has been stored by the Dumps Recorder (with Preserve Dumps checked) after a page reload, but other than that, I think it works just fine, but I would really like you guys to keep an eye on things and let me know if you notice any issues. Finally, this change does not affect items sent to the error bluescreen or the variables in the Template Resources panel, or the PW Info panel etc - these currently still rely on the maxDepth and maxLength settings in the module config. I am not completely convinced this is a good idea yet, but I am going to leave this checked here and see how it goes. If you try it out, please let me know if you have any problems.1 point
-
Have you checked that $part is returning what you expect? Any chance it should be $part->id1 point
-
Can also be the difference of mac and windows or version difference. Microsoft is really not great at keeping things in sync :D.1 point
-
1 point
-
Haven't read through this in detail, but my quick guess would be the image single vs array issue. $product->img->first()->url Or if you want, you can set the "Max Files Allowed" to 1 on the Details tab of the "img" field settings.1 point
-
Great to see so many contributors. Transition to more community driven development seems to be going strong!1 point
-
Thanks. I knew very little about PHP before a few months ago. I just studied the processwire API and it's very well written. I'm more a designer so my CSS skills outweigh any PHP ones this is what I like about processwire, I have 100% control over HTML/CSS and the built in methods make it quite simple to grab stuff out the database.1 point
-
Which PW version do you use? (namespaced or not) or simply try this: $p = new Processwire\PageArray(); // added namespace $editable_pages = wire("user")->editable_pages; // use wire() $branches = wire("pages")->find("template=branch"); // use wire() foreach($branches as $branch){ foreach ($editable_pages as $edit) { if($branch->id == $edit->id){ $p->add($branch); } } } return $p; please play around with and without added namespace, but let in the wire() calls.1 point
-
Here is the current state - I've used "Delete" as it's the official term though I know it can be misleading. Anyway, renaming the button is not a big deal from the code POV. I think the words Delete - Cancel are equally long in English so it couldn'be a problem in most cases (in other languages if the Delete is too narrow and one clicks on the right side of it, the Are you sure btn may be under his mouse).1 point
-
Erase? Though, "delete" is the best. Using "delete" instead of "trash" in the context of working with a Trash is a bad habit in IT lingo...1 point
-
@tpr Could you make it so the confirm link does not appear in the same location as the initiating link - I'm just worried about some users I know who click twice in the same place; they'll end up inadvertently wiping pages if the confirmation link isn't offset from their last click position. There's a demo Pen here, (it was based on one of LostKobrakai's pens - can't find the link now) that shows what I mean.1 point
-
This trash vs delete conversation makes me think that the Delete tab on the edit page interface should actually be called Trash. The page list action button is Trash, but the Delete tab does the same thing so they should be named for consistency.1 point
-
I don't think wipe is a strong enough word. I was thinking something like eliminate, even though that sounds too strong... or maybe destroy? but instead of 'please confirm' maybe 'delete bypassing trash'? I forgot to add, so many great ideas from the community on this module. It's so great that these ideas have come to fruition tpr! Just like what Processwire has done. Great work everybody!1 point
-
1 point
-
Oh great, thanks! I've spent a lot of time to figure this out but haven't spot that. What a relief! Apparently everything worked fine but there were these PHP notices that showed something's not right.1 point
-
The name (array key) you set in your getExtraActions hook needs to match what is passed as $action in the processAction hook. You're using "delete" in one place and "wipe" in the other.1 point
-
Quick update: it turned out that the problem of blog_files not being added to the template is due to $this->files somehow having become a reserved variable. It holds an instance of WireLog instead of the blog_files field created earlier, though I haven't spotted the part in the core where this happens yet. However, changing $this->files to $this->blogfiles fixed the problem. I'm now going to run some tests. Stay tuned.1 point
-
@antoiba86: I don't think downgrading is really an option. But I've already got the magnific and markup issues sorted and am working on the issue with the blog_files field, so a 3.0-compatible version is around the corner. @kongondo: as I've got a few sites running on 2.8, I try to stay clear of namespaces anyway1 point