Jump to content

spoetnik

Members
  • Posts

    76
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Europe, the Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

spoetnik's Achievements

Full Member

Full Member (4/6)

16

Reputation

  1. Inspired by this reading? https://htmx.org/essays/template-fragments/#known-template-fragment-implementations
  2. What you describe @bernhard would be what i'm looking for. It would even be more ideal if I could expose a component via a HTMX-api. That way I don't have to maintain a separate htmx component. What I mean bij JSON api, is the AppApi integration with Twack I would be cool if the output could also be just html, and preferably a part of the template, or component.
  3. I am looking for good way to implement htmx, and creating some sort of API for this. The API should return 'parts' in HTML to replace parts in the DOM. These returned parts could be components. As Twack works with components, and has (JSON)API support, would Twack be the ideal base to build a HTMX frontend on? And how would i do this? Any suggestions?
  4. Thanks for you answer. Actually I don't need the count, but don't want any "Brands" without references. This is my final code: <ul class="list-inline"> <?php $brands = $pages->find('template=brand'); $brands = $brands->sort('-numReferences'); $brandCount = 0; foreach($brands as $brand): if($brandCount > 5) break; if ($brand->hasReferences) { $brandCount ++; echo "<li class='list-inline-item'><a href='/auctions/?brand=$brand->id'>$brand->title</a></li>"; } endforeach; ?> </ul>
  5. I have products referencing to brands using a page reference field. Now I want a list of brands, ordered by number of references. I found the function $page->references(), but how do I sort this? <?php $brands = $pages->find('template=brand'); $data = ''; foreach($brands as $brand) { if ($brand->references()->count()) { $data .= "<li class='list-inline-item'><a href='/auctions/?brand=$brand->id'>$brand->title</a></li>"; } } echo $data; ?> Thanks for any suggestions!
  6. I once build e recurringEvents modules myself. https://github.com/spoetnik/ProcessRecurringEvents maybe it could inspire you? recurrence are ‘fictional’ and calculated, and only made to real Processwire pages when needed.
  7. When browsing the form, the 'Shop link' in the top right, doesn't have the link to Login Register Pro module.
  8. Sorry for bumping an old topic. I have made a GitHub repo for my dev, and production setup. https://github.com/spoetnik/apache_php-fpm_mysql
  9. Tracy Injects the 'Font Awesome 4.7.0' css into the frontend. This fucks up my layout, as I am using v 5.0.13 in my frontend. Is there an easy way to prevent tracy from injecting this css?
  10. Any Nginx guru out there that can translate those enhancements to a nginx-config?
  11. Thanks @LostKobrakai. Looked into the 'Dynamic Roles' Its looks like an abandoned module from Ryan, but the up-to-date fork from @matjazp works. I saw your comment, , and that's exactly the same problem I have with this module. I would love to use this module as a base, or write a pull-request to have this functionality, but I am not skilled enough to do that. The hook into 'PageFinder::getQuery' scares me to add the selector ```saas_id=user()->saas_id``` to my Saas module.
  12. See my module: https://github.com/spoetnik/SaaS On all selected templates, a 'saas_id'-field is added, and populated. I would like to add a selector to all selectors in to filter by saas_id. I could add the selector in all my templates, but that's error-prone, so I prefer to have a hook to add it. Maybe this post could be a starting point?
  13. I am building a module, to restrict access based on a saas_id. I would like to add a selector to all page listings like: saas_id=user()->saas_id what would be a good hook to use?
  14. What would be needed to get this module to work with Processwire 3? I get the error 'FieldtypeRangeSlider: Default value should be in format [int,int]. (1,100) if range is checked'
×
×
  • Create New...