Jump to content

bernhard

Members
  • Posts

    6,629
  • Joined

  • Last visited

  • Days Won

    358

Everything posted by bernhard

  1. Copying repeater items is easier than you might think. Repeater items are just regular pages, just not visible in the tree as you would expect. But they are there. So you can just clone them as if they were regular pages. @adrian has built an adminaction in his module for that. I had a discussion with him about using my clone method instead of his getNew() approach. See https://github.com/adrianbj/ProcessAdminActions/pull/7 The problem is that my implementation does not work on his side. So I would be happy if you could try out my approach of just cloning the repeater item and setting a new parent and tell us if that worked for you. The key is to find the new parent for the cloned repeater item. You find it by it's name: https://github.com/adrianbj/ProcessAdminActions/pull/7/commits/a92227707e20b32ff2144edb999f8008ff450d1c#diff-2780518325127d1f954f0c4a906b8d6fR106
  2. Maybe because the topic was intended to share a github repo about cool projects around the uikit framework. It was never ment to be a discussion thread about different css frameworks. PW is open to everything, and therefore anybody can choose its favourite. So everybody please come back to topic or open a new one related to discussion about css frameworks. Thanks.
  3. Agree on all the above ? This video is really great - and even if it was rebuilt I think it should be linked nearby. 8 years later and the foundation and principles are still the same and more trendy than ever before. Just awesome!! Headless as a totally new concept?! Bore me more ?
  4. On the department page, simply this: // $page = department A or B $persons = $pages->find([ 'template' => 'person', 'has_parent' => $page, ]); And for an overall overview: $persons = $pages->find('template=person');
  5. DepId would be a variable of course. Listing all persons would be as easy as just "template=person" But maybe you have a different template setup. I thought departments have template dep and meet have template persons and persons have template person. Is it different?
  6. On mobile... Maybe I don't understand your problem. Why not just "has_parent=depId, template=person"?
  7. Didn't see that and haven't tried it yet. But I guess you're right... I'll test it the other days ?
  8. Maybe you got me wrong: I was just saying (or trying to say) that I guess that everybody knows it, because the admin uses it. It was in no way forcing anybody to use it. Always ? But it's a little offtopic imho. And the link shows just a graph like this one... Bulma looks also great though ?
  9. https://processwire.com/blog/posts/rebuilding-pw-website-part2/
  10. I love the uikit css framework and everybody here should know it since the admin is built upon it. Here are several other great projects around the uikit framework, like free templates, IDE code snippets, starter kits, and also a backlink to processwire ? https://github.com/uikit/awesome-uikit
  11. Anybody here loving UiKit and VSCode? This might be something for you ? https://marketplace.visualstudio.com/items?itemName=Keno.uikit-3-snippets
  12. Hey @thetuningspoon I just tried your suggestion about the WireArray/WireData... It's awesome ? I did it a little differently though, because my RockGrids don't work the way you implemented it. v1.0.9 introduces a new method: $finder->getWireArray(); This will return a WireArray containing WireData objects just as you suggested: For anybody wondering what this update could be used for: You can use all the pw api magic on that objects: New version is on GitHub - I'll change my public projects to github to have the PW modules directory automatically in sync: https://github.com/BernhardBaumrock/RockFinder/commit/46377ba6ea399f8557893684da3c3dd486b2c44e
  13. All cookies cleared? Cache reset etc?
  14. Thanks for sharing! I think I wouldn't buy a theme of a theme company that uses a bought WordPress theme for their own website ? Or am I biased?
  15. That's two approaches I did in my modules: https://gitlab.com/baumrock/RockPdf/blob/master/RockPdf.module.php#L37-38 https://gitlab.com/baumrock/RockForms/blob/master/RockForms.module.php#L63-64 But I have to admit that I don't use all those composer, gulp and whatsoever tools, so there might be better solutions and I'd be happy to see how others do ?
  16. Very nice tutorial, thx! I wonder if that would be nice to have as a module. Installable, reusable, one-click-updateable.... But maybe it would be easier to extend available libraries, such as https://doc.nette.org/en/2.4/html-elements
  17. Thx adrian, I still have the bug on the AOS language switcher z-index. Any news on this? On the config var the description column is very large, leading to a horizontal scrollbar. Maybe it would make sense to use text-overflow: ellipsis; here? Is it intended that the links to the api ref opens in the same window? I know we can middle-click, but I wonder if it was better to open it in a new tab by default? Sorry, I don't get what you are talking about ?
  18. Great to hear that. I wouldn't call it well thought out, though. When I started building it I had far too less knowledge about what's going on on the regular page finder. I think the module could be improved a lot on several sides. But it get's all the jobs done for me and I can build RockGrids with thousands of pages that load in some ms compared to loading times above 30s that I had before. I'd love to have a better version of RockFinder in the core ? Sounds like a good idea, I'll have a look ? PS: 2 seconds still sounds very slow for 200 rows. May I see your finder setup?
  19. Did I already say that I love PW? ? I had to write an offer today and I wanted to link to a portfolio website that I've built, but the link was too long for the PDF. Then I wanted to use one of the url shortening services, but it felt wrong to put a link like bit.ly/409weifsd on my offer. I then just enabled UrlSegments on my website's home.php template, added a repeater with fields "title" and "link" and put 5 lines of code to get my very own custom short-links: $shorturl = $sanitizer->text($input->urlSegment(1)); if($shorturl) { $link = @$page->shorturls->findOne("title=$shorturl")->link; if(!$link) throw new Wire404Exception(); $session->redirect($link); } If you want to try it out: https://www.baumrock.com/pw-demo Any suggestions for improvements are welcome ?
  20. Thx for reporting that. Could you please provide a working solution so that I don't need to setup a completely new environment using a subdir? Thx
  21. Thx, done! Also added an example for the hosts setting.
  22. Thx robin I know about that but somehow it didn't work. I need to see why and when that happens, but setting the maxage didn't solve it unfortunately.
  23. Exactly. That's one of the reasons why I don't like site profiles and created ProcessWire Kickstart. It's not finished at all, but it works for me and it's just a showcase of a different and more flexible approach. Yes, you're right, and that would have been my suggestion for you to try. Module development is great and a lot of fun. From what I've read in your posts (this one was awesome btw) I guess you'll also like it a lot ? Creating pages, templates and fields can be a little tedious though. There is the Migrations Module that has some helpers. I'd love to have a nicer and cleaner API though for such tasks, also handling naming collisions etc., eg createField, createTemplate, addFieldToTemplate, removeFieldFromTemplate, editInContext, etc, etc Maybe you want to take that idea as inspiration and start something like this while playing around with pw module development? ?
  24. Yes! And a prev/next link on each post ? Great updates! Love them ?
  25. If anybody might wonder. This is how to setup permissions for a sub-page of a processmodule: As easy as adding the permission to the nav item! If you want the permission to be created/deleted on module install/uninstall you also have to add it in the "permissions" array: $info = [ 'title' => 'ProcessProjects', 'summary' => 'ProcessModule to manage all Projects', 'version' => 1, 'author' => 'Bernhard Baumrock, baumrock.com', 'icon' => 'thumbs-up', 'permission' => 'projects', 'permissions' => [ 'projects' => 'Run the Projects Management Module', 'aggregate' => 'Create Aggregated Reports', ], 'page' => [ 'name' => 'projects', 'title' => __('Projekte'), ], 'nav' => [ [ 'url' => '', 'label' => __('Projekte'), ],[ 'url' => 'mails', 'label' => __('E-Mails verwalten'), ],[ 'url' => 'reports', 'label' => __('Berichte verwalten'), ],[ 'url' => 'aggregate', 'label' => __('Aggregierten Bericht erstellen'), 'permission' => 'aggregate', ], ], ]; Make sure to logout/login, otherwise you won't see the changes in the menu! If you call the ProcessModule's page directly you will instantly get the result of the changed permissions: Whereas in the menu it is still there until you logout+login: @szabesz you asked for that in the blog comments...
×
×
  • Create New...