Jump to content

renobird

PW-Moderators
  • Posts

    1,699
  • Joined

  • Last visited

  • Days Won

    14

Everything posted by renobird

  1. There are a few ways to do this. Option 1 (Field Dependencies in Repeaters) The dependencies are limited to field=value, and you need to be sure to change this config option. Create a page field (select) with all the "block" types you want. Create fields for each of those block types and add them to the repeater. (Example: Text, Image(s), File(s), Video, etc…) This method works, but it can be a little clunky from a UX perspective. I'm mostly mentioning it for reference, option 2 below is really much cleaner. Option 2 (PageTable or PageTable Extended) As Adrian mentioned, PageTable will be available in 2.5 (available now on the dev branch). The extended version that Marc (MadeMyDay) released is amazing, and sounds like a perfect fit for what you need. The benefit of this method, is that each block type can have as many fields as you need. You can create complex layouts (even within each block) without the user attempting to size/position things in a WYSIWYG.
  2. Hey Antti, I do have language packs installed. Turns out there was some other weird stuff with the install as well. Just setup a fresh test environment, and everything is working as expected. Sorry for the false alarm.
  3. First time using this module (the core version). I have the module installed, and 4 LanguageText fields. How do I make them into tabs? I assumed there would be a new field type that I wrap them in, but nothing is showing. Running the latest dev
  4. that's it.
  5. Perhaps this module would be helpful? My thought would be to make the contact association on the companies page with a page field, and remove the page field from the actual contact.
  6. Where do you want to see the contacts for the company? In a list view (like the sample module I posted), or when you actually view the companies page?
  7. Are you using "custom selector to find selectable pages" or "Custom PHP code to find selectable pages"? wait. yeah, that's duplicating the effort. Are you just wanting these to show in the admin?
  8. Glad to help. Now you can start picking apart all the other process modules and swiping all their good ideas.
  9. Just to echo what Diogo has said, service pages sound like a great fit here.
  10. Ivan, Things like this are a bit more advanced, so there might not be too much documentation (outside the forum topic you linked to above). At least not yet. In the meantime, I find I learn a lot by looking at the modules in the /wire/ folder. It gives you some idea of the things you can tap into. I also look at the source for just about every non-core module to see what other devs are doing — you can learn a lot (quickly) that way.
  11. I don't know how familiar you are with Process Modules, but I posted a quick example a while back. Once you get started, they are super addicting. You can build just about anything.
  12. I'm not really sure about the larger questions there. I think you could build this all in the admin (not frontend pages). I sounds like you might might want to make a process module. List all the projects and provide links to common tasks for each of them. Maybe just a simple admin table would be enough?
  13. Thanks Soma, That could work. I was thinking there might be a way to trigger the ajax upload that happens on the drag/drop — just on input change instead. I haven't spend much time looking it yet, thought I'd post here for thoughts first. If that turns out to be too complicated, your method above will do the trick for sure.
  14. Hello all, Before I go building something, I thought I'd ask here for existing solutions or opinions. I have a large group of users who are stuck using IE9 (and will be for some time), so the drag/drop image upload doesn't work for them. Not a problem, they don't see the "drag and drop files here" label. Many of these users have requested that the "browse" button auto upload images once they are selected. The reason for this is that in order to work with the images (sort/add captions) etc, they have to go to the top/bottom of the page to hit save and then scroll back to the images field to keep working. My questions: Have any of you done this already — If so, do you mind sharing? Are there pitfalls to this idea that I'm just too dense to see at the moment?
  15. Sorry about that, my posts where a little unclear. The markdown method won't allow for the modal (sorry if I unintentionally lead you down a rabbit hole there). I was referring to using a module and a hook to add the link to the field when using the modal. I'm short on time, but if you don't get it sorted out, I can dig up the code and post it.
  16. Of course, this still takes you out of context. So you might want to go the module route and load jquery magnific module and use &modal=1 in the URL as well. Sorry for the plain explanations, difficult to post code from a phone.
  17. I don't think that's possible to do with the add new from a page field. However, you can use markdown syntax in the description for your page field to add a "add new organization" link as part of the field description. Be sure to specify /processwire/page/add/?parent_id={parent-id-here} in the URL. There are other ways using modules and hooks of course, but they are more involved than I can post on mobile.
  18. Not sure, but in that case it's OK for it to fail, because the admin (me) has some cleanup to do.
  19. This seems to work. At least through some simple tests. public function redirectMe($event){ $page = $event->arguments(0); $errors = false; foreach(wire('notices') as $notice){ if($notice instanceof NoticeError) $errors = true; } if (!$errors) $this->session->redirect($this->config->url->admin . "/processwire/news/"); }
  20. Thanks Martijn, That got me thinking, maybe I can just check the notices? $errors = false; foreach(wire('notices') as $notice) { $notice instanceof NoticeError ? $errors = true : "";
 } Haven't tried that yet, just riffing. Will report back.
  21. How do I check for errors (required fields not filled in, etc..)? I need to redirect after a successful page save, but only if there are no errors. public function init() { $this->pages->addHookAfter('save', $this, 'redirectMe'); } public function redirectMe($event){ if ($event->arguments(0) != "news") return; $this->session->redirect($this->config->url->admin . "/processwire/news/"); } The code above redirects even if there are errors on the page.
  22. Apologies for the brief reply, on mobile. https://processwire.com/talk/topic/3145-multiple-views-for-templates/page-2#entry32876
  23. I'm a little stumped on this one. $image->size(1000,1000,array("quality" => 20)); $image->size(1000,1000); These (not run together) produce an image with the same file size and appear to be exactly the same. I'm clearing out all variations before each test. Default options in config.php don't have a quality specified. Running latest dev. I'll test again on another install/server tonight, but posting this in the event anyone else has run into this and can point me in the right direction.
  24. Hi Horst, I may have misunderstood, but should adding that allow me to use the module on the profile template? I installed PIM and added the config settings, but I'm still getting the error.
  25. Hi Horst, I'm not using PIM, is there a way to have it installed, but not show any of the options when cropping?
×
×
  • Create New...